Erlend E. Aasland <erlend.aasl...@innova.no> added the comment:

Is there a deterministic way to test these changes? Will something a la this be 
sufficient:

import gc
import sys

gc.collect()
before = sys.gettotalrefcount()

import somemod
del sys.modules['somemod']
del somemod

gc.collect()
after = sys.gettotalrefcount()

assert after == before

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42972>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to