[3.6] bpo-34200: Fix non-determinism of test_pkg (GH-9248) by miss-islington · Pull Request #9253 · python/cpython
This causes the tearDown code to only unimport the test modules specifically created as part of each test via the self.mkhier method rather than abusing test.support.modules_setup() and the scary test.support.modules_cleanup() code.
https://bugs.python.org/issue34200
(cherry picked from commit 4ae8ece)
Co-authored-by: Gregory P. Smith greg@krypto.org