Skip to content

Commit 459c5f4

Browse files
authored
Merge pull request #5637 from asottile/backport-5636
[4.6] #5636 Fix ordering of sys modules snapshot
2 parents 30de669 + f06ae52 commit 459c5f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testing/test_pytester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ def test_inline_run_taking_and_restoring_a_sys_modules_snapshot(
245245
):
246246
spy_factory = self.spy_factory()
247247
monkeypatch.setattr(pytester, "SysModulesSnapshot", spy_factory)
248-
original = dict(sys.modules)
249248
testdir.syspathinsert()
249+
original = dict(sys.modules)
250250
testdir.makepyfile(import1="# you son of a silly person")
251251
testdir.makepyfile(import2="# my hovercraft is full of eels")
252252
test_mod = testdir.makepyfile(

0 commit comments

Comments
 (0)