Merge pull request #5636 from asottile/fixup_sysmodules_test

Fix ordering of sys modules snapshot
This commit is contained in:
Anthony Sottile 2019-07-20 12:30:18 -07:00 committed by GitHub
commit 13c4b7d212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -231,8 +231,8 @@ class TestInlineRunModulesCleanup:
): ):
spy_factory = self.spy_factory() spy_factory = self.spy_factory()
monkeypatch.setattr(pytester, "SysModulesSnapshot", spy_factory) monkeypatch.setattr(pytester, "SysModulesSnapshot", spy_factory)
original = dict(sys.modules)
testdir.syspathinsert() testdir.syspathinsert()
original = dict(sys.modules)
testdir.makepyfile(import1="# you son of a silly person") testdir.makepyfile(import1="# you son of a silly person")
testdir.makepyfile(import2="# my hovercraft is full of eels") testdir.makepyfile(import2="# my hovercraft is full of eels")
test_mod = testdir.makepyfile( test_mod = testdir.makepyfile(