Skip to content

Commit

Permalink
tests: correctly check isLocked
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-- committed Dec 5, 2022
1 parent e81445a commit 98a7665
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions paquo/tests/test_pathobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ def test_geojson_serialization(path_annotation, qupath_version):
assert "properties" in geo_json
prop = geo_json["properties"]

if qupath_version < QuPathVersion("0.4.0"):
assert prop["isLocked"] == path_annotation.locked
if path_annotation.locked:
assert prop["isLocked"] is True
else:
assert "isLocked" not in prop
if qupath_version < QuPathVersion("0.4.0"):
assert prop["isLocked"] is False
else:
assert "isLocked" not in prop

# bad practice
if qupath_version <= QuPathVersion("0.2.3"):
Expand Down

0 comments on commit 98a7665

Please sign in to comment.