File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 11# content of conftest.py
22
3+ import gc
4+
35import guidata
46import h5py
57import numpy
68import PIL
9+ import pytest
710import qtpy
811import qwt
912import scipy
1720execenv .verbose = "quiet"
1821
1922
23+ @pytest .fixture (scope = "session" , autouse = True )
24+ def disable_gc_for_tests ():
25+ """Disable garbage collection for all tests in the session."""
26+ # Important note:
27+ # ---------------
28+ # We need to disable garbage collection for all tests in the session because
29+ # this test suite is not representative of a typical application.
30+ # The high level of stress on the garbage collector can lead to false positives
31+ # in tests that rely on reference counting or finalization.
32+ # In a typical application, the garbage collector should be left enabled.
33+
34+ gc .disable ()
35+ yield
36+ gc .enable ()
37+
38+
2039def pytest_report_header (config ):
2140 """Add additional information to the pytest report header."""
2241 qtbindings_version = qtpy .PYSIDE_VERSION
You can’t perform that action at this time.
0 commit comments