File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ def res_id(params):
3030
3131
3232RES = [42 , 43 ]
33+ TEST_PX_SZ = 4.56
3334
3435
3536@pytest .fixture (params = RES , ids = res_id , scope = "module" )
@@ -75,7 +76,7 @@ def vols_1(data_1):
7576
7677@pytest .fixture
7778def vols_2 (data_2 ):
78- return Volume (data_2 , pixel_size = 4.56 )
79+ return Volume (data_2 , pixel_size = TEST_PX_SZ )
7980
8081
8182@pytest .fixture
@@ -295,6 +296,13 @@ def test_save_load(vols_1):
295296 assert vols_loaded_double .pixel_size is None , "Pixel size should be None"
296297
297298
299+ def test_volume_pixel_size (vols_2 ):
300+ """
301+ Test volume is storing pixel_size attribute.
302+ """
303+ assert np .isclose (TEST_PX_SZ , vols_2 .pixel_size ), "Incorrect Volume pixel_size"
304+
305+
298306def test_save_load_pixel_size (vols_2 ):
299307 # Create a tmpdir in a context. It will be cleaned up on exit.
300308 with tempfile .TemporaryDirectory () as tmpdir :
You can’t perform that action at this time.
0 commit comments