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
Currently, the test runner keeps references to all TestCase objects until the end of the run; that means that resources referred to by TestCase attributes are kept around until the end of the test run. That can lead to false positive reports of leaked objects. (In the case that provoked this report, we were tracking Qt QObjects alive before and after each test method.)
unittest used to behave the same way (and still does for Python 2.x), but the behaviour was changed for Python 3.4. See https://bugs.python.org/issue11798
While I'd argue that individual TestCase objects should still be cleaning up after themselves anyway, it would be good to at least have the option to remove those objects once each test has been run.
The text was updated successfully, but these errors were encountered:
For the record, here's the corresponding commit for CPython (since it's not 100% trivial to extract it from the issue discussion): python/cpython@eb97368
Currently, the test runner keeps references to all TestCase objects until the end of the run; that means that resources referred to by TestCase attributes are kept around until the end of the test run. That can lead to false positive reports of leaked objects. (In the case that provoked this report, we were tracking Qt
QObject
s alive before and after each test method.)unittest
used to behave the same way (and still does for Python 2.x), but the behaviour was changed for Python 3.4. See https://bugs.python.org/issue11798While I'd argue that individual
TestCase
objects should still be cleaning up after themselves anyway, it would be good to at least have the option to remove those objects once each test has been run.The text was updated successfully, but these errors were encountered: