Skip to content

Commit

Permalink
remove second test
Browse files Browse the repository at this point in the history
  • Loading branch information
robmarkcole committed Nov 28, 2024
1 parent 8c0366d commit 8c8dd78
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
3 changes: 0 additions & 3 deletions src/litdata/streaming/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,6 @@ def deserialize(self, data: bytes) -> Any:
return tifffile.imread(io.BytesIO(data)) # This is a NumPy array

def can_serialize(self, item: Any) -> bool:
print(
f"Checking can_serialize for: {item}, exists: {os.path.isfile(item)}, suffix: {item.lower().endswith(('.tif', '.tiff'))}"
)
return isinstance(item, str) and os.path.isfile(item) and item.lower().endswith((".tif", ".tiff"))


Expand Down
9 changes: 0 additions & 9 deletions tests/streaming/test_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,3 @@ def test_tiff_serializer():

# Clean up
os.remove(file_path)


def test_tiff_serializer_can_serialize():
serializer = TIFFSerializer()
assert serializer.can_serialize("image.tif")
assert serializer.can_serialize("image.tiff")
assert not serializer.can_serialize("image.jpg")
assert not serializer.can_serialize(None)
assert not serializer.can_serialize(123)

0 comments on commit 8c8dd78

Please sign in to comment.