From 3e3d4a4b55cbef481486aaa68ee255f4928b9c3f Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 12 Sep 2018 18:29:33 -0700 Subject: 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 --- Misc/NEWS.d/next/Tests/2018-09-12-17-00-34.bpo-34200.dfxYQK.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Tests/2018-09-12-17-00-34.bpo-34200.dfxYQK.rst (limited to 'Misc/NEWS.d/next') diff --git a/Misc/NEWS.d/next/Tests/2018-09-12-17-00-34.bpo-34200.dfxYQK.rst b/Misc/NEWS.d/next/Tests/2018-09-12-17-00-34.bpo-34200.dfxYQK.rst new file mode 100644 index 00000000000..b53339c5856 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2018-09-12-17-00-34.bpo-34200.dfxYQK.rst @@ -0,0 +1,3 @@ +Fixed non-deterministic flakiness of test_pkg by not using the scary +test.support.module_cleanup() logic to save and restore sys.modules contents +between test cases. -- cgit v1.2.3-65-gdbad