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 a97d35a commit fbac7de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/napari_pyav/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.0.4"
__version__ = "0.0.5"

from ._reader import napari_get_reader

Expand Down
23 changes: 1 addition & 22 deletions src/napari_pyav/_tests/test_reader.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import numpy as np
from napari_pyav import napari_get_reader


# # tmp_path is a pytest fixture
def test_reader(tmp_path):

Expand All @@ -11,27 +10,7 @@ def test_reader(tmp_path):
reader = napari_get_reader([video_path])([video_path])[0][0]
print(reader, type(reader))
for frame in reader:
assert isinstance(frame, np.ndarray), str(type(reader)) + str(reader)
# """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)

# # 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 it's the same as it started
# np.testing.assert_allclose(original_data, layer_data_tuple[0])

assert isinstance(frame, np.ndarray)

def test_get_reader_pass():
reader = napari_get_reader("fake.file")
Expand Down

0 comments on commit fbac7de

Please sign in to comment.