From 27c9d80a7ec2c5e122748986f224e5549b799db4 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sat, 20 Jul 2019 11:17:30 -0700 Subject: [PATCH] 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 37b63f31a..ba3135f65 100644 --- a/testing/test_pytester.py +++ b/testing/test_pytester.py @@ -231,8 +231,8 @@ class TestInlineRunModulesCleanup: ): 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(