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(