Skip to content

Commit 14d6e19

Browse files
authored
gh-108303: Create Lib/test/test_dataclasses/ directory (#108978)
Move test_dataclasses.py and its "dataclass_*.py" modules into the new Lib/test/test_dataclasses/ subdirectory.
1 parent 1fb20d4 commit 14d6e19

7 files changed

+6
-5
lines changed

Lib/test/test_dataclasses.py renamed to Lib/test/test_dataclasses/__init__.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -3684,10 +3684,10 @@ class C:
36843684
self.assertEqual(C(10).x, 10)
36853685

36863686
def test_classvar_module_level_import(self):
3687-
from test import dataclass_module_1
3688-
from test import dataclass_module_1_str
3689-
from test import dataclass_module_2
3690-
from test import dataclass_module_2_str
3687+
from test.test_dataclasses import dataclass_module_1
3688+
from test.test_dataclasses import dataclass_module_1_str
3689+
from test.test_dataclasses import dataclass_module_2
3690+
from test.test_dataclasses import dataclass_module_2_str
36913691

36923692
for m in (dataclass_module_1, dataclass_module_1_str,
36933693
dataclass_module_2, dataclass_module_2_str,
@@ -3725,7 +3725,7 @@ def test_classvar_module_level_import(self):
37253725
self.assertNotIn('not_iv4', c.__dict__)
37263726

37273727
def test_text_annotations(self):
3728-
from test import dataclass_textanno
3728+
from test.test_dataclasses import dataclass_textanno
37293729

37303730
self.assertEqual(
37313731
get_type_hints(dataclass_textanno.Bar),

Makefile.pre.in

+1
Original file line numberDiff line numberDiff line change
@@ -2156,6 +2156,7 @@ TESTSUBDIRS= idlelib/idle_test \
21562156
test/test_capi \
21572157
test/test_cppext \
21582158
test/test_ctypes \
2159+
test/test_dataclasses \
21592160
test/test_email \
21602161
test/test_email/data \
21612162
test/test_import \

0 commit comments

Comments
 (0)