Merge pull request #5637 from asottile/backport-5636
[4.6] #5636 Fix ordering of sys modules snapshot
This commit is contained in:
commit
459c5f4e49
|
@ -245,8 +245,8 @@ class TestInlineRunModulesCleanup(object):
|
||||||
):
|
):
|
||||||
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(
|
||||||
|
|
Loading…
Reference in New Issue