Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9bceb8a

Browse filesBrowse files
[3.12] gh-108303: Create Lib/test/test_dataclasses/ directory (GH-108978) (#109674)
* gh-108303: Create Lib/test/test_dataclasses/ directory (GH-108978) Move test_dataclasses.py and its "dataclass_*.py" modules into the new Lib/test/test_dataclasses/ subdirectory. (cherry picked from commit 14d6e19) Co-authored-by: Victor Stinner <vstinner@python.org> * Fix Lint job: update Lib/test/.ruff.toml --------- Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent b153cab commit 9bceb8a
Copy full SHA for 9bceb8a

8 files changed

+7
-6
lines changed

‎Lib/test/.ruff.toml

Copy file name to clipboardExpand all lines: Lib/test/.ruff.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extend-exclude = [
2222
"test_capi/test_unicode.py",
2323
"test_ctypes/test_arrays.py",
2424
"test_ctypes/test_functions.py",
25-
"test_dataclasses.py",
25+
"test_dataclasses/__init__.py",
2626
"test_descr.py",
2727
"test_enum.py",
2828
"test_functools.py",

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

Copy file name to clipboardExpand all lines: Lib/test/test_dataclasses/__init__.py
+5-5Lines changed: 5 additions & 5 deletions
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

Copy file name to clipboardExpand all lines: Makefile.pre.in
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,6 +2134,7 @@ TESTSUBDIRS= idlelib/idle_test \
21342134
test/test_capi \
21352135
test/test_cppext \
21362136
test/test_ctypes \
2137+
test/test_dataclasses \
21372138
test/test_email \
21382139
test/test_email/data \
21392140
test/test_import \

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.