bpo-34200: Fix non-determinism of test_pkg (GH-9248)


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 4ae8ece5cd4c5853b625381db13429f25512108d)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 files changed