Skip to content

Commit

Permalink
tests: explicitly test downsample for different oses
Browse files Browse the repository at this point in the history
This needs further investigation. But it's non breaking for now.
  • Loading branch information
ap-- committed Jul 29, 2020
1 parent 6ccc5d1 commit f7d3535
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion paquo/tests/test_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,29 @@ def test_image_properties_from_image_server(image_entry):
assert image_entry.num_channels == 3
assert image_entry.num_timepoints == 1
assert image_entry.num_z_slices == 1
assert image_entry.downsample_levels == {0: {'downsample': 1.0, 'height': 2967, 'width': 2220}}


def test_image_downsample_levels(image_entry):
# TODO INVESTIGATE: VERY STRANGE???
import platform
if platform.system() == "Darwin":
# ON OSX WE GET ONE DOWNSAMPLE LEVEL
levels = {
0: {'downsample': 1.0,
'height': 2967,
'width': 2220},
}
else:
# ON THE OTHER OSES IT'S TWO???
levels = {
0: {'downsample': 1.0,
'height': 2967,
'width': 2220},
1: {'downsample': 3.865438534407666,
'height': 768,
'width': 574},
}
assert image_entry.downsample_levels == levels


def test_metadata_interface(image_entry):
Expand Down

0 comments on commit f7d3535

Please sign in to comment.