Skip to content

Commit 59a848a

Browse files
pushing
1 parent 226f2a0 commit 59a848a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/test/test_unittest/testmock/testpatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
from test.support.import_helper import DirsOnSysPath
1515
from test.test_importlib.util import uncache
16+
lazy from json import dumps as lazy_dumps # noqa: F401
1617
from unittest.mock import (
1718
NonCallableMock, CallableMixin, sentinel,
1819
MagicMock, Mock, NonCallableMagicMock, patch, _patch,
@@ -23,7 +24,6 @@
2324
builtin_string = 'builtins'
2425

2526
PTModule = sys.modules[__name__]
26-
lazy from json import dumps as lazy_dumps # noqa: F401
2727
MODNAME = '%s.PTModule' % __name__
2828

2929

Lib/unittest/mock.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,9 +1470,9 @@ def get_original(self):
14701470
except (AttributeError, KeyError):
14711471
original = getattr(target, name, DEFAULT)
14721472
else:
1473-
local = True
1474-
if isinstance(original, types.LazyImportType):
1475-
original = original.resolve()
1473+
local = True
1474+
if isinstance(original, types.LazyImportType):
1475+
original = original.resolve()
14761476

14771477
if name in _builtins and isinstance(target, ModuleType):
14781478
self.create = True

0 commit comments

Comments
 (0)