Skip to content

Commit

Permalink
test: fix type-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
kod-kristoff committed Mar 25, 2024
1 parent 2b930dc commit 072336a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_json_arrays_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def test_dump_to_file_stderr(
@pytest.mark.parametrize("file_suffix", [".json", ".jsonl", ".ndjson"])
def test_sink(file_suffix: str, snapshot, array_of_dicts: list[dict]) -> None:
with tempfile.NamedTemporaryFile(suffix=file_suffix) as fp:
with json_arrays.sink(fp) as sink:
with json_arrays.sink(fp) as sink: # type: ignore[arg-type]
for obj in array_of_dicts:
sink.send(obj)
fp.seek(0)
Expand All @@ -181,7 +181,7 @@ def test_sink(file_suffix: str, snapshot, array_of_dicts: list[dict]) -> None:
@pytest.mark.parametrize("file_suffix", [".json", ".jsonl", ".ndjson"])
def test_sink_dict(file_suffix: str, snapshot) -> None:
with tempfile.NamedTemporaryFile(suffix=file_suffix) as fp:
with json_arrays.sink(fp) as sink:
with json_arrays.sink(fp) as sink: # type: ignore[arg-type]
sink.send({"a": "b"})
fp.seek(0)
data_written = fp.read()
Expand Down

0 comments on commit 072336a

Please sign in to comment.