8000 gh-108303: Move `ann_module*.py` files to `typinganndata/` folder (GH… · miss-islington/cpython@86a4f67 · GitHub
[go: up one dir, main page]

Skip to content

Commit 86a4f67

Browse files
sobolevnmiss-islington
authored andcommitted
pythongh-108303: Move ann_module*.py files to typinganndata/ folder (pythonGH-108354)
(cherry picked from commit 3f61cf6) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
1 parent 4a0c118 commit 86a4f67

File tree

13 files changed

+13
-8
lines changed

13 files changed

+13
-8
lines changed

Lib/test/test_grammar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
# different import patterns to check that __annotations__ does not interfere
1414
# with import machinery
15-
import test.ann_module as ann_module
15+
import test.typinganndata.ann_module as ann_module
1616
import typing
17-
from test import ann_module2
17+
from test.typinganndata import ann_module2
1818
import test
1919

2020
# These are shared with test_tokenize and other test modules.
@@ -463,7 +463,7 @@ def test_var_annot_module_semantics(self):
463463
def test_var_annot_in_module(self):
464464
# check that functions fail the same way when executed
465465
# outside of module where they were defined
466-
ann_module3 = import_helper.import_fresh_module("test.ann_module3")
466+
ann_module3 = import_helper.import_fresh_module("test.typinganndata.ann_module3")
467467
with self.assertRaises(NameError):
468468
ann_module3.f_bad_ann()
469469
with self.assertRaises(NameError):

Lib/test/test_inspect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4584,7 +4584,7 @@ def func(*args, **kwargs):
45844584

45854585
def test_base_class_have_text_signature(self):
45864586
# see issue 43118
4587-
from test.ann_module7 import BufferedReader
4587+
from test.typinganndata.ann_module7 import BufferedReader
45884588
class MyBufferedReader(BufferedReader):
45894589
"""buffer reader class."""
45904590

Lib/test/test_module/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,9 @@ def test_annotations_getset_raises(self):
324324
del foo.__annotations__
325325

326326
def test_annotations_are_created_correctly(self):
327-
ann_module4 = import_helper.import_fresh_module('test.ann_module4')
327+
ann_module4 = import_helper.import_fresh_module(
328+
'test.typinganndata.ann_module4',
329+
)
328330
self.assertTrue("__annotations__" in ann_module4.__dict__)
329331
del ann_module4.__annotations__
330332
self.assertFalse("__annotations__" in ann_module4.__dict__)

Lib/test/test_opcodes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Python test set -- part 2, opcodes
22

33
import unittest
4-
from test import ann_module, support
4+
from test import support
5+
from test.typinganndata import ann_module
56

67
class OpcodeTest(unittest.TestCase):
78

Lib/test/test_typing.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5306,7 +5306,7 @@ def test_errors(self):
53065306

53075307

53085308
# We need this to make sure that `@no_type_check` respects `__module__` attr:
5309-
from test import ann_module8
5309+
from test.typinganndata import ann_module8
53105310

53115311
@no_type_check
53125312
class NoTypeCheck_Outer:
@@ -5893,7 +5893,9 @@ def test_overload_registry_repeated(self):
58935893

58945894
# Definitions needed for features introduced in Python 3.6
58955895

5896-
from test import ann_module, ann_module2, ann_module3, ann_module5, ann_module6
5896+
from test.typinganndata import (
5897+
ann_module, ann_module2, ann_module3, ann_module5, ann_module6,
5898+
)
58975899

58985900
T_a = TypeVar('T_a')
58995901

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)
0