Skip to content
Snippets Groups Projects
Verified Commit c753451c authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Add more sophisticated test for caosdb-server#127

parent 5659b824
No related branches found
No related tags found
1 merge request!14Test for caosdb-server!32 (nan in lists)
Pipeline #13288 failed
...@@ -377,8 +377,16 @@ def test_issue_154_with_versioning(): ...@@ -377,8 +377,16 @@ def test_issue_154_with_versioning():
def test_issue_127(): def test_issue_127():
"""https://gitlab.com/caosdb/caosdb-server/-/issues/127""" """https://gitlab.com/caosdb/caosdb-server/-/issues/127"""
p = db.Property("TestProp", datatype=db.LIST(db.DOUBLE)).insert() p = db.Property(name="TestDoubleProperty", datatype=db.LIST(db.DOUBLE)).insert()
rt = db.RecordType("TestRT").add_property("TestProp", ["NaN"]).insert() rt = db.RecordType(name="TestRecordType").add_property(name="TestDoubleProperty",
value=["nan"]).insert()
test1 = db.execute_query("FIND TestRecordType", unique=True)
assert math.isnan(test1.get_property("TestDoubleProperty").value[0])
test2 = db.execute_query(
"FIND TestRecordType WITH TestDoubleProperty = NaN", unique=True)
assert math.isnan(test1.get_property("TestDoubleProperty").value[0])
def test_issue_170(): def test_issue_170():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment