diff --git a/tests/test_pysnooper.py b/tests/test_pysnooper.py index 28f0289..8578fb3 100644 --- a/tests/test_pysnooper.py +++ b/tests/test_pysnooper.py @@ -189,7 +189,8 @@ def test_file_output(): return y + x result = my_function('baba') assert result == 15 - output = path.open().read() + with path.open() as output_file: + output = output_file.read() assert_output( output, (