Skip to content

Commit

Permalink
tests: more hierarchy and image tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-- committed Aug 19, 2020
1 parent b6ad96e commit 820aecd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions paquo/tests/test_hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,13 @@ def test_add_duplicate_to_hierarchy(svs_small, tmp_path):
)
annotation.name = "abc"
assert len(entry1.hierarchy) == 2


def test_add_incorrect_to_hierarchy(empty_hierarchy):
with pytest.raises(TypeError):
# noinspection PyTypeChecker
empty_hierarchy.annotations.add("abc")

with pytest.raises(TypeError):
# noinspection PyTypeChecker
empty_hierarchy.annotations.discard("abc")
2 changes: 1 addition & 1 deletion paquo/tests/test_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def rebase(self, *x, **y):
assert set(ip.rebase('file:/abc.svs', 'file:/efg.svs')) == {None}


def test_image_provider_uri_from_path():
def test_image_provider_uri_from_relpath_and_abspath():
with pytest.raises(ValueError):
ImageProvider.uri_from_path(Path('./abc.svs'))

Expand Down

0 comments on commit 820aecd

Please sign in to comment.