Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Twisted reactor not exiting cleanly. Encountered while running pytest, which does not exit after all tests are finished. Reproduction steps below.
Ubuntu 22.04.1 LTS
Python 3.10.6
binance-connector==1.18.0
Twisted==22.8.0
pytest==7.2.0
From: Invoking Twisted From Other Threads
Test case:
Expected outcome:
Test finishes successfully,
pytest
exists gracefully at the end.Actual outcome:
Test finishes successfully,
pytest
hangs indefinitelyPre fix output
At this point, pytest hangs, never exits or gives up control of the command line. Last printed logline:
============================================================================= 1 passed in 124.56s (0:02:04) ==============================================================================
Post fix output
At this point, pytest finishes successfully, exits gracefully, and returns command line control to the caller.