STINNER Victor <vstin...@python.org> added the comment:

> You could save/restore this data only when corresponded modules was imported, 
> like it was done in clear_caches() in refleak.py.

It was my first idea, but some large modules like multiprocessing and asyncio 
are only imported by tested when the test file is imported, whereas 
save_environment() is called (__enter__) before the import in 
libregrtest.runtest.

----------

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

Reply via email to