From 9210c32197a88fbe15fb74067033c14e08fa0afe Mon Sep 17 00:00:00 2001 From: Julius Schlensok Date: Thu, 13 Jun 2024 12:27:18 +0000 Subject: [PATCH] chore: suppress typeguard checking on tests intentionally using incompatible inputs --- tests/unit_tests/test_parquet.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit_tests/test_parquet.py b/tests/unit_tests/test_parquet.py index 0897949..801decb 100644 --- a/tests/unit_tests/test_parquet.py +++ b/tests/unit_tests/test_parquet.py @@ -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 @@ -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"])