Skip to content

Commit

Permalink
Simplify redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
nineteendo committed Sep 18, 2024
1 parent 8130756 commit b79be48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/jsonyx/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@


def check_syntax_err(
exc_info: pytest.ExceptionInfo[Any], msg: str, colno: int = 1,
exc_info: pytest.ExceptionInfo[Any],
msg: str,
colno: int = 1,
end_colno: int = -1,
) -> None:
"""Check JSON syntax error."""
Expand Down
3 changes: 1 addition & 2 deletions src/jsonyx/test/test_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def test_file(json: ModuleType) -> None:

def test_stdout(json: ModuleType) -> None:
"""Test write to stdout."""
io: StringIO = StringIO()
with redirect_stdout(io):
with redirect_stdout(StringIO()) as io:
json.dump(0, end="")
assert io.getvalue() == "0"

0 comments on commit b79be48

Please sign in to comment.