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
After calling a function in models.py that uses self._read_line(), it'd be good if we could test that there's no remaining output left for the stockfish process. I've added a fixture in test_models.py that can be used to test the stockfish instance (after each test function finishes). So if there's a way to test that trying to call stockfish._read_line() will hang at that point (due to no output left over), that might be good.
Also, the current way we consume remaining output relies on having to know what the last line looks like (see self._discard_remaining_stdout_lines()). A more streamlined solution may be better. E.g., the top answer here could maybe be used, with a wait time of a millisecond?
The text was updated successfully, but these errors were encountered:
johndoknjas
changed the title
Test that the stockfish process doesn't have remaining output
Consuming remaining output of the stockfish popen process
Jul 18, 2023
After calling a function in models.py that uses self._read_line(), it'd be good if we could test that there's no remaining output left for the stockfish process. I've added a fixture in test_models.py that can be used to test the stockfish instance (after each test function finishes). So if there's a way to test that trying to call stockfish._read_line() will hang at that point (due to no output left over), that might be good.
Also, the current way we consume remaining output relies on having to know what the last line looks like (see self._discard_remaining_stdout_lines()). A more streamlined solution may be better. E.g., the top answer here could maybe be used, with a wait time of a millisecond?
The text was updated successfully, but these errors were encountered: