Skip to content

Commit

Permalink
Turn introspection on in the main_window fixture
Browse files Browse the repository at this point in the history
It is not clear why this is needed, but without this the tests
abort on exit with "QThread: Destroyed while thread is still running"
  • Loading branch information
jitseniesen committed Apr 15, 2024
1 parent c831ec1 commit a208113
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spyder_unittest/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ def main_window(monkeypatch):

# Don't show tours message
CONF.set('tours', 'show_tour_message', False)

# Turn introspection on, even though it's slower and more memory
# intensive, because otherwise tests are aborted at end with
# "QThread: Destroyed while thread is still running".
os.environ['SPY_TEST_USE_INTROSPECTION'] = 'True'

QApplication.processEvents()

# Start the window
Expand All @@ -52,3 +58,5 @@ def main_window(monkeypatch):
CONF.reset_to_defaults(notification=False)
CONF.reset_manager()
PLUGIN_REGISTRY.reset()

os.environ.pop('SPY_TEST_USE_INTROSPECTION')

0 comments on commit a208113

Please sign in to comment.