Skip to content

bpo-40275: Remove all new modules imported by tests #21167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

shihai1991
Copy link
Member

@shihai1991 shihai1991 commented Jun 26, 2020

@shihai1991
Copy link
Member Author

@vstinner Hi, victor. I checked the codes of your idea:
Maybe we need a mechanism to load everything needed to run tests, and restore old sys.modules before loading tests. The risk is to load a module multiple times, but I don't think that it's an issue. in #20207

  • sequential run tests: you have write the unload mechanism, but your code just try to unload the test (sub)modules, so we enhance to unload all new import modules is good enough, no?
  • multiprocess run tests: it's run in subprocess, so it's no necessary to unload the import modules in tests, right?

@iritkatriel
Copy link
Member

iritkatriel commented Jul 30, 2021

https://bugs.python.org/issue40275 is closed. What is the status of this PR?

@shihai1991
Copy link
Member Author

https://bugs.python.org/issue40275 is closed. What is the status of this PR?

Hi, Irit. Thanks for your mention. I forget this PR's details already: ( I close it now.

@shihai1991 shihai1991 closed this Jul 31, 2021
@vstinner
Copy link
Member

vstinner commented Aug 6, 2021

Ah, it was forgotten in https://bugs.python.org/issue40275 which has tons of PRs. Thanks for cleanup @iritkatriel ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants