summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-09-12 18:29:33 -0700
committerGitHub <noreply@github.com>2018-09-12 18:29:33 -0700
commit3e3d4a4b55cbef481486aaa68ee255f4928b9c3f (patch)
treee7c6f2206fcc56c7f634211929fbbc80b34ca227 /Misc/NEWS.d/next/Tests
parent[3.6] bpo-34652: Remove lchmod from the big func checking block. (GH-9250) (diff)
downloadcpython-3e3d4a4b55cbef481486aaa68ee255f4928b9c3f.tar.gz
cpython-3e3d4a4b55cbef481486aaa68ee255f4928b9c3f.tar.bz2
cpython-3e3d4a4b55cbef481486aaa68ee255f4928b9c3f.zip
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>
Diffstat (limited to 'Misc/NEWS.d/next/Tests')
-rw-r--r--Misc/NEWS.d/next/Tests/2018-09-12-17-00-34.bpo-34200.dfxYQK.rst3
1 files changed, 3 insertions, 0 deletions
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.