Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bjudkewitz committed Oct 5, 2024
1 parent d29105a commit 4c732e0
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions src/napari_pyav/_tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,31 @@

from napari_pyav import napari_get_reader


# # tmp_path is a pytest fixture
# def test_reader(tmp_path):
# """An example of how you might test your plugin."""
def test_reader(tmp_path):
assert True
# """An example of how you might test your plugin."""

# # write some fake data using your supported file format
# my_test_file = str(tmp_path / "myfile.npy")
# original_data = np.random.rand(20, 20)
# np.save(my_test_file, original_data)
# # write some fake data using your supported file format
# my_test_file = str(tmp_path / "myfile.npy")
# original_data = np.random.rand(20, 20)
# np.save(my_test_file, original_data)

# # try to read it back in
# reader = napari_get_reader(my_test_file)
# assert callable(reader)
# # try to read it back in
# reader = napari_get_reader(my_test_file)
# assert callable(reader)

# # make sure we're delivering the right format
# layer_data_list = reader(my_test_file)
# assert isinstance(layer_data_list, list) and len(layer_data_list) > 0
# layer_data_tuple = layer_data_list[0]
# assert isinstance(layer_data_tuple, tuple) and len(layer_data_tuple) > 0
# # make sure we're delivering the right format
# layer_data_list = reader(my_test_file)
# assert isinstance(layer_data_list, list) and len(layer_data_list) > 0
# layer_data_tuple = layer_data_list[0]
# assert isinstance(layer_data_tuple, tuple) and len(layer_data_tuple) > 0

# # make sure it's the same as it started
# np.testing.assert_allclose(original_data, layer_data_tuple[0])
# # make sure it's the same as it started
# np.testing.assert_allclose(original_data, layer_data_tuple[0])


# def test_get_reader_pass():
def test_get_reader_pass():
assert True
# reader = napari_get_reader("fake.file")
# assert reader is None

0 comments on commit 4c732e0

Please sign in to comment.