8000 Review · python/cpython@875e0bd · GitHub
[go: up one dir, main page]

Skip to content

Commit 875e0bd

Browse files
committed
Review
1 parent 97e8d47 commit 875e0bd

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Lib/test/test_enum.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,10 +1275,6 @@ class Holiday(date, Enum):
12751275
IDES_OF_MARCH = 2013, 3, 15
12761276
self.Holiday = Holiday
12771277

1278-
@cpython_only
1279-
def test_lazy_import(self):
1280-
ensure_lazy_imports("enum", {"functools", "warnings", "inspect", "re"})
1281-
12821278
def test_bool(self):
12831279
# plain Enum members are always True
12841280
class Logic(Enum):
@@ -5293,6 +5289,10 @@ class MiscTestCase(unittest.TestCase):
52935289
def test__all__(self):
52945290
support.check__all__(self, enum, not_exported={'bin', 'show_flag_values'})
52955291

5292+
@cpython_only
5293+
def test_lazy_import(self):
5294+
ensure_lazy_imports("enum", {"functools", "warnings", "inspect", "re"})
5295+
52965296
def test_doc_1(self):
52975297
class Single(Enum):
52985298
ONE = 1

Lib/test/test_pathlib/test_pathlib.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ def test_is_notimplemented(self):
8181
self.assertTrue(isinstance(pathlib.UnsupportedOperation(), NotImplementedError))
8282

8383

84+
class TestImportTime(unittest.TestCase):
85+
@cpython_only
86+
def test_lazy_import(self):
87+
import_helper.ensure_lazy_imports("pathlib", {"shutil"})
88+
89+
8490
#
8591
# Tests for the pure classes.
8692
#
@@ -130,10 +136,6 @@ class StrSubclass(str):
130136
for part in p.parts:
131137
self.assertIs(type(part), str)
132138

133-
@cpython_only
134-
def test_lazy_import(self):
135-
import_helper.ensure_lazy_imports("pathlib", {"shutil"})
136-
137139
def test_str_subclass_common(self):
138140
self._check_str_subclass('')
139141
self._check_str_subclass('.')

0 commit comments

Comments
 (0)
0