mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
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.
Backport to 3.11: update Lib/test/.ruff.toml.
(cherry picked from commit 14d6e197cc)
This commit is contained in:
parent
e59ee6c59e
commit
ca8da713d5
8 changed files with 7 additions and 6 deletions
|
|
@ -13,7 +13,7 @@ extend-exclude = [
|
|||
"test_fstring.py",
|
||||
# TODO Fix: F811 Redefinition of unused name
|
||||
"test_buffer.py",
|
||||
"test_dataclasses.py",
|
||||
"test_dataclasses/__init__.py",
|
||||
"test_descr.py",
|
||||
"test_enum.py",
|
||||
"test_functools.py",
|
||||
|
|
|
|||
|
|
@ -3568,10 +3568,10 @@ class C:
|
|||
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,
|
||||
|
|
@ -3609,7 +3609,7 @@ def test_classvar_module_level_import(self):
|
|||
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),
|
||||
|
|
@ -1962,6 +1962,7 @@ TESTSUBDIRS= ctypes/test \
|
|||
test/test_asyncio \
|
||||
test/test_capi \
|
||||
test/test_cppext \
|
||||
test/test_dataclasses \
|
||||
test/test_email \
|
||||
test/test_email/data \
|
||||
test/test_import \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue