Skip to content

Commit

Permalink
Fix file closing unit test breaking due to pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed May 3, 2021
1 parent 3954f59 commit f6d43c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/tools/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def test_command_close_stdout(tmpdir):
with args.other as _:
pass

assert not args.input.closed
# pytest patches sys.input on some platforms it seems
if hasattr(args.input, "closed"):
assert not args.input.closed

assert not args.output.closed
assert args.other.closed

0 comments on commit f6d43c5

Please sign in to comment.