Message205167
Test attached unittest_leak.py script: you will see MyException.ninstance counter increased up to 10, whereas I expect that MyException is destroyed at TestCase.run() exit.
It looks like a tricky reference cycle between:
- frames
- exc_info local variable of _Outcome.testPartExecutor() context manager
- _Outcome.errors list
- _Outclass instance
Attached unittest_workaround.patch patch works around the issue. |
|
| Date |
User |
Action |
Args |
| 2013-12-03 22:46:41 | vstinner | set | recipients:
+ vstinner, pitrou |
| 2013-12-03 22:46:40 | vstinner | set | messageid: <[email protected]> |
| 2013-12-03 22:46:40 | vstinner | link | issue19880 messages |
| 2013-12-03 22:46:40 | vstinner | create | |
|