Skip to content

Commit 3f61cf6

Browse files
authored
gh-108303: Move ann_module*.py files to typinganndata/ folder (#108354)
1 parent f5559f3 commit 3f61cf6

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.
@@ -452,7 +452,7 @@ def test_var_annot_module_semantics(self):
452452
def test_var_annot_in_module(self):
453453
# check that functions fail the same way when executed
454454
# outside of module where they were defined
455-
ann_module3 = import_helper.import_fresh_module("test.ann_module3")
455+
ann_module3 = import_helper.import_fresh_module("test.typinganndata.ann_module3")
456456
with self.assertRaises(NameError):
457457
ann_module3.f_bad_ann()
458458
with self.assertRaises(NameError):

Lib/test/test_inspect.py

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

47274727
def test_base_class_have_text_signature(self):
47284728
# see issue 43118
4729-
from test.ann_module7 import BufferedReader
4729+
from test.typinganndata.ann_module7 import BufferedReader
47304730
class MyBufferedReader(BufferedReader):
47314731
"""buffer reader class."""
47324732

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
@@ -5377,7 +5377,7 @@ def test_errors(self):
53775377

53785378

53795379
# We need this to make sure that `@no_type_check` respects `__module__` attr:
5380-
from test import ann_module8
5380+
from test.typinganndata import ann_module8
53815381

53825382
@no_type_check
53835383
class NoTypeCheck_Outer:
@@ -5968,7 +5968,9 @@ def test_overload_registry_repeated(self):
59685968

59695969
# Definitions needed for features introduced in Python 3.6
59705970

5971-
from test import ann_module, ann_module2, ann_module3, ann_module5, ann_module6
5971+
from test.typinganndata import (
5972+
ann_module, ann_module2, ann_module3, ann_module5, ann_module6,
5973+
)
59725974

59735975
T_a = TypeVar('T_a')
59745976

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)