|
12 | 12 | def test_sdata_fixture(sdata, request): |
13 | 13 | """Tests the sdata fixture.""" |
14 | 14 | sdata = request.getfixturevalue(sdata) |
15 | | - assert sdata.images["data1"].shape == (1, 10, 10) |
16 | | - |
17 | | - |
18 | | -# @pytest.mark.parametrize( |
19 | | -# "sdata", |
20 | | -# [ |
21 | | -# "test_sdata_single_image", |
22 | | -# "test_sdata_multiple_images", |
23 | | -# "test_sdata_multiple_images_dims" |
24 | | -# ], |
25 | | -# ) |
26 | | -# def test_image_accessor_correct_image_key_string(sdata, request): |
27 | | -# """Tests the image accessor with a correct image key string.""" |
28 | | -# sdata = request.getfixturevalue(sdata) |
29 | | -# sdata.im['data1'] |
30 | | - |
31 | | -# assert sdata.im.i == 'data1' |
32 | | - |
33 | | - |
34 | | -# @pytest.mark.parametrize( |
35 | | -# "sdata, query", |
36 | | -# [ |
37 | | -# ("test_sdata_single_image", ["data1"]), |
38 | | -# ("test_sdata_multiple_images", ["data1"]), |
39 | | -# ("test_sdata_multiple_images", ["data1", "data2"]), |
40 | | -# ("test_sdata_multiple_images", ["data1", "data3"]), |
41 | | -# ("test_sdata_multiple_images_dims", ['data1']), |
42 | | -# ("test_sdata_multiple_images_dims", ['data1', 'data2']), |
43 | | -# ], |
44 | | -# ) |
45 | | -# def test_image_accessor_correct_image_key_list(sdata, query, request): |
46 | | -# """Tests the image accessor with a correct image key list.""" |
47 | | -# sdata = request.getfixturevalue(sdata) |
48 | | -# sdata.im[query] |
49 | | -# assert sdata.im.i == query |
50 | | - |
51 | | - |
52 | | -# @pytest.mark.parametrize( |
53 | | -# "sdata", |
54 | | -# [ |
55 | | -# "test_sdata_single_image", |
56 | | -# "test_sdata_multiple_images", |
57 | | -# "test_sdata_multiple_images_dims" |
58 | | -# ], |
59 | | -# ) |
60 | | -# def test_image_accessor_wrong_correct_image_key_string(sdata, request): |
61 | | -# """Tests the image accessor with a wrong image key string.""" |
62 | | -# sdata = request.getfixturevalue(sdata) |
63 | | -# with pytest.raises(AssertionError): |
64 | | -# sdata.im['wrong'] |
65 | | - |
66 | | - |
67 | | -# @pytest.mark.parametrize( |
68 | | -# "sdata", |
69 | | -# [ |
70 | | -# "test_sdata_single_image", |
71 | | -# "test_sdata_multiple_images", |
72 | | -# "test_sdata_multiple_images_dims" |
73 | | -# ], |
74 | | -# ) |
75 | | -# def test_image_accessor_correct_channel(sdata, request): |
76 | | -# """Tests the image accessor with a wrong image key string.""" |
77 | | -# sdata = request.getfixturevalue(sdata) |
78 | | -# sdata.im[0] |
79 | | - |
80 | | -# assert isinstance(sdata.im.i, list) |
81 | | -# assert sdata.im.c == 0 |
82 | | - |
83 | | - |
84 | | -# @pytest.mark.parametrize( |
85 | | -# "sdata", |
86 | | -# [ |
87 | | -# "test_sdata_single_image", |
88 | | -# "test_sdata_multiple_images", |
89 | | -# "test_sdata_multiple_images_dims" |
90 | | -# ], |
91 | | -# ) |
92 | | -# def test_image_accessor_correct_image_key_and_channel(sdata, request): |
93 | | -# """Tests the image accessor with a wrong image key string.""" |
94 | | -# sdata = request.getfixturevalue(sdata) |
95 | | -# sdata.im['data1', 0] |
96 | | - |
97 | | -# assert isinstance(sdata.im.i, str) |
98 | | -# assert sdata.im.c == 0 |
| 15 | + assert sdata.images["data1_image"].shape == (1, 10, 10) |
0 commit comments