Skip to content

Commit

Permalink
Fix test warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Feb 27, 2023
1 parent beddefb commit 301e70a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_core_atlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@ def test_additional_ref_dict(temp_path):
for k in ["1", "2"]:
stack = np.ones((10, 20, 30)) * int(k)
fake_data[k] = stack
tifffile.imsave(temp_path / f"{k}.tiff", stack)
tifffile.imwrite(temp_path / f"{k}.tiff", stack)

add_ref_dict = AdditionalRefDict(fake_data.keys(), temp_path)

for k, stack in add_ref_dict.items():
assert add_ref_dict[k] == stack

assert add_ref_dict["3"] is None
with pytest.warns(UserWarning, match="No reference named 3"):
assert add_ref_dict["3"] is None


@pytest.mark.parametrize(
Expand Down
1 change: 1 addition & 0 deletions tests/test_structure_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
]


@pytest.mark.filterwarnings("ignore:No mesh filename for region root")
def test_structure_indexing():
structures_dict = StructuresDict(structures_list)
print(structures_dict)
Expand Down

0 comments on commit 301e70a

Please sign in to comment.