File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313import scipy
1414import tifffile
1515from guidata .env import execenv
16- from qtpy import QtCore as QC
17- from qtpy import QtWidgets as QW
1816
1917import plotpy
2018
@@ -51,20 +49,6 @@ def pytest_runtest_setup(item):
5149 pytest .skip ("Skipped in offscreen mode (requires display)" )
5250
5351
54- @pytest .hookimpl (tryfirst = True )
55- def pytest_runtest_teardown (item , nextitem ): # pylint: disable=unused-argument
56- """Run teardown after each test."""
57- # This is necessary to close any open dialogs after each test because the
58- # mechanism used to close them automatically in the test suite
59- # (i.e., `exec_dialog`) does not work with some PyQt versions.
60- QC .QCoreApplication .processEvents ()
61- qapp : QW .QApplication = QW .QApplication .instance ()
62- if qapp is not None :
63- for widget in qapp .topLevelWidgets ():
64- if isinstance (widget , QW .QDialog ) and widget .isVisible ():
65- widget .reject ()
66-
67-
6852@pytest .fixture (scope = "session" , autouse = True )
6953def disable_gc_for_tests ():
7054 """Disable garbage collection for all tests in the session."""
You can’t perform that action at this time.
0 commit comments