You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When unit tests fail, there is an issue where log file is closed prior to test exiting.
Example error:
Message: 'p4 sync --parallel=threads=0 //...'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "/Users/carl/.pyenv/versions/3.6.0/lib/python3.6/logging/__init__.py", line 989, in emit
stream.write(msg)
ValueError: I/O operation on closed file.
Repro caused by removing one of the with exception blocks in a unit test (or adding one where an exception is not raised)
I was able to track this down to the use of capsys in test_server_fixture
If we remove such usage, the issue is resolved. However, it is quite convenient to print to stdout the server address.
Suggested solutions:
Find a workaround to allow continued use of capsys
Remove use of capsys, add to instructions in test_server_fixture to run pytest with a special flag to disable output capturing so you can still see the test server address printed to stdout
The text was updated successfully, but these errors were encountered:
noticed in #203
When unit tests fail, there is an issue where log file is closed prior to test exiting.
Example error:
Repro caused by removing one of the
with exception
blocks in a unit test (or adding one where an exception is not raised)I was able to track this down to the use of
capsys
intest_server_fixture
If we remove such usage, the issue is resolved. However, it is quite convenient to print to stdout the server address.
Suggested solutions:
capsys
capsys
, add to instructions intest_server_fixture
to run pytest with a special flag to disable output capturing so you can still see the test server address printed to stdoutThe text was updated successfully, but these errors were encountered: