Skip to content

Commit

Permalink
chore: suppress typeguard checking on tests intentionally using incom…
Browse files Browse the repository at this point in the history
…patible inputs
  • Loading branch information
JSchlensok committed Jun 13, 2024
1 parent ece1b57 commit 9210c32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unit_tests/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pyarrow.parquet as pq
import pytest
import scipy
from typeguard import suppress_type_checks

from spectrum_io.file import parquet

Expand Down Expand Up @@ -53,14 +54,14 @@ def test_modify_partition(self, raw_data, tmpdir):

def test_write_not_implemented(self, raw_data, tmpdir):
"""Check whether write_file() raises a NotImplementedError if provided with an unsupported object."""
with pytest.raises(NotImplementedError):
with pytest.raises(NotImplementedError), suppress_type_checks():
output_path = Path(tmpdir / "table.parquet")
df = pd.DataFrame(raw_data).to_numpy()
parquet.write_file(df, output_path)

def test_read_write_partition_not_implemented(self, raw_data, tmpdir):
"""Check whether write_partition() raises a NotImplementedError if provided with an unsupported object."""
with pytest.raises(NotImplementedError):
with pytest.raises(NotImplementedError), suppress_type_checks():
output_path = Path(tmpdir / "partition")
df = pd.DataFrame(raw_data).to_numpy()
parquet.write_partition([df, df], output_path, ["dataset_1", "dataset_2"])
Expand Down

0 comments on commit 9210c32

Please sign in to comment.