Message389105
Serhiy: "You could save/restore this data only when corresponded modules was imported, like it was done in clear_caches() in refleak.py."
That's a very good idea! I implemented it in PR 24934. But I modified runtest() to use *two* saved_test_environment instance. One before the test module is imported, one after. The one before is needed to check if the import itself has side effect, for example if the module body has side effect. The second is to check if running tests has side effect. The second one is more likely to have modules imported. The first one may miss some bugs, but IMO it's an acceptable trade-off. |
|
Date |
User |
Action |
Args |
2021-03-19 17:45:20 | vstinner | set | recipients:
+ vstinner, terry.reedy, zach.ware, serhiy.storchaka, pablogsal, shihai1991 |
2021-03-19 17:45:20 | vstinner | set | messageid: <1616175920.11.0.508864208837.issue41718@roundup.psfhosted.org> |
2021-03-19 17:45:20 | vstinner | link | issue41718 messages |
2021-03-19 17:45:19 | vstinner | create | |
|