mirror of
https://github.com/python/cpython.git
synced 2025-08-15 22:30:42 +00:00
[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 14d6e197cc
)
Co-authored-by: Victor Stinner <vstinner@python.org>
* Fix Lint job: update Lib/test/.ruff.toml
---------
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
b153cab6d8
commit
9bceb8a79b
8 changed files with 7 additions and 6 deletions
|
@ -22,7 +22,7 @@ extend-exclude = [
|
|||
"test_capi/test_unicode.py",
|
||||
"test_ctypes/test_arrays.py",
|
||||
"test_ctypes/test_functions.py",
|
||||
"test_dataclasses.py",
|
||||
"test_dataclasses/__init__.py",
|
||||
"test_descr.py",
|
||||
"test_enum.py",
|
||||
"test_functools.py",
|
||||
|
|
|
@ -3684,10 +3684,10 @@ class TestStringAnnotations(unittest.TestCase):
|
|||
self.assertEqual(C(10).x, 10)
|
||||
|
||||
def test_classvar_module_level_import(self):
|
||||
from test import dataclass_module_1
|
||||
from test import dataclass_module_1_str
|
||||
from test import dataclass_module_2
|
||||
from test import dataclass_module_2_str
|
||||
from test.test_dataclasses import dataclass_module_1
|
||||
from test.test_dataclasses import dataclass_module_1_str
|
||||
from test.test_dataclasses import dataclass_module_2
|
||||
from test.test_dataclasses import dataclass_module_2_str
|
||||
|
||||
for m in (dataclass_module_1, dataclass_module_1_str,
|
||||
dataclass_module_2, dataclass_module_2_str,
|
||||
|
@ -3725,7 +3725,7 @@ class TestStringAnnotations(unittest.TestCase):
|
|||
self.assertNotIn('not_iv4', c.__dict__)
|
||||
|
||||
def test_text_annotations(self):
|
||||
from test import dataclass_textanno
|
||||
from test.test_dataclasses import dataclass_textanno
|
||||
|
||||
self.assertEqual(
|
||||
get_type_hints(dataclass_textanno.Bar),
|
|
@ -2134,6 +2134,7 @@ TESTSUBDIRS= idlelib/idle_test \
|
|||
test/test_capi \
|
||||
test/test_cppext \
|
||||
test/test_ctypes \
|
||||
test/test_dataclasses \
|
||||
test/test_email \
|
||||
test/test_email/data \
|
||||
test/test_import \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue