From f06ae5297b2ab59c8df4610ccdcb29797ee05100 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sat, 20 Jul 2019 12:30:18 -0700 Subject: [PATCH] Merge pull request #5636 from asottile/fixup_sysmodules_test Fix ordering of sys modules snapshot --- testing/test_pytester.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_pytester.py b/testing/test_pytester.py index 54d364ca1..f7cc0936c 100644 --- a/testing/test_pytester.py +++ b/testing/test_pytester.py @@ -245,8 +245,8 @@ class TestInlineRunModulesCleanup(object): ): spy_factory = self.spy_factory() monkeypatch.setattr(pytester, "SysModulesSnapshot", spy_factory) - original = dict(sys.modules) testdir.syspathinsert() + original = dict(sys.modules) testdir.makepyfile(import1="# you son of a silly person") testdir.makepyfile(import2="# my hovercraft is full of eels") test_mod = testdir.makepyfile(