From 14d6e197cc56e5256d501839a4e66e3864ab15f0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 6 Sep 2023 15:54:16 +0200 Subject: [PATCH] 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. --- .../__init__.py} | 10 +++++----- Lib/test/{ => test_dataclasses}/dataclass_module_1.py | 0 .../{ => test_dataclasses}/dataclass_module_1_str.py | 0 Lib/test/{ => test_dataclasses}/dataclass_module_2.py | 0 .../{ => test_dataclasses}/dataclass_module_2_str.py | 0 Lib/test/{ => test_dataclasses}/dataclass_textanno.py | 0 Makefile.pre.in | 1 + 7 files changed, 6 insertions(+), 5 deletions(-) rename Lib/test/{test_dataclasses.py => test_dataclasses/__init__.py} (99%) rename Lib/test/{ => test_dataclasses}/dataclass_module_1.py (100%) rename Lib/test/{ => test_dataclasses}/dataclass_module_1_str.py (100%) rename Lib/test/{ => test_dataclasses}/dataclass_module_2.py (100%) rename Lib/test/{ => test_dataclasses}/dataclass_module_2_str.py (100%) rename Lib/test/{ => test_dataclasses}/dataclass_textanno.py (100%) diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses/__init__.py similarity index 99% rename from Lib/test/test_dataclasses.py rename to Lib/test/test_dataclasses/__init__.py index bd8d8243841..7c07dfc77de 100644 --- a/Lib/test/test_dataclasses.py +++ b/Lib/test/test_dataclasses/__init__.py @@ -3684,10 +3684,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, @@ -3725,7 +3725,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), diff --git a/Lib/test/dataclass_module_1.py b/Lib/test/test_dataclasses/dataclass_module_1.py similarity index 100% rename from Lib/test/dataclass_module_1.py rename to Lib/test/test_dataclasses/dataclass_module_1.py diff --git a/Lib/test/dataclass_module_1_str.py b/Lib/test/test_dataclasses/dataclass_module_1_str.py similarity index 100% rename from Lib/test/dataclass_module_1_str.py rename to Lib/test/test_dataclasses/dataclass_module_1_str.py diff --git a/Lib/test/dataclass_module_2.py b/Lib/test/test_dataclasses/dataclass_module_2.py similarity index 100% rename from Lib/test/dataclass_module_2.py rename to Lib/test/test_dataclasses/dataclass_module_2.py diff --git a/Lib/test/dataclass_module_2_str.py b/Lib/test/test_dataclasses/dataclass_module_2_str.py similarity index 100% rename from Lib/test/dataclass_module_2_str.py rename to Lib/test/test_dataclasses/dataclass_module_2_str.py diff --git a/Lib/test/dataclass_textanno.py b/Lib/test/test_dataclasses/dataclass_textanno.py similarity index 100% rename from Lib/test/dataclass_textanno.py rename to Lib/test/test_dataclasses/dataclass_textanno.py diff --git a/Makefile.pre.in b/Makefile.pre.in index 7b67738f434..eb8f8c4fb94 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -2156,6 +2156,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 \