summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2023-08-23 15:42:08 (GMT)
committerGitHub <noreply@github.com>2023-08-23 15:42:08 (GMT)
commit3f61cf646d0506baa0c0c2118f05110446519c62 (patch)
tree0422bf72d76cdcdbb8387f761a429f2402b05baf /Lib
parentf5559f38d9831e7e55a518e516bcd620ec13af14 (diff)
downloadcpython-3f61cf646d0506baa0c0c2118f05110446519c62.zip
cpython-3f61cf646d0506baa0c0c2118f05110446519c62.tar.gz
cpython-3f61cf646d0506baa0c0c2118f05110446519c62.tar.bz2
gh-108303: Move `ann_module*.py` files to `typinganndata/` folder (#108354)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_grammar.py6
-rw-r--r--Lib/test/test_inspect.py2
-rw-r--r--Lib/test/test_module/__init__.py4
-rw-r--r--Lib/test/test_opcodes.py3
-rw-r--r--Lib/test/test_typing.py6
-rw-r--r--Lib/test/typinganndata/ann_module.py (renamed from Lib/test/ann_module.py)0
-rw-r--r--Lib/test/typinganndata/ann_module2.py (renamed from Lib/test/ann_module2.py)0
-rw-r--r--Lib/test/typinganndata/ann_module3.py (renamed from Lib/test/ann_module3.py)0
-rw-r--r--Lib/test/typinganndata/ann_module4.py (renamed from Lib/test/ann_module4.py)0
-rw-r--r--Lib/test/typinganndata/ann_module5.py (renamed from Lib/test/ann_module5.py)0
-rw-r--r--Lib/test/typinganndata/ann_module6.py (renamed from Lib/test/ann_module6.py)0
-rw-r--r--Lib/test/typinganndata/ann_module7.py (renamed from Lib/test/ann_module7.py)0
-rw-r--r--Lib/test/typinganndata/ann_module8.py (renamed from Lib/test/ann_module8.py)0
13 files changed, 13 insertions, 8 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index ee105a3..8507a07 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -12,9 +12,9 @@ from sys import *
# different import patterns to check that __annotations__ does not interfere
# with import machinery
-import test.ann_module as ann_module
+import test.typinganndata.ann_module as ann_module
import typing
-from test import ann_module2
+from test.typinganndata import ann_module2
import test
# These are shared with test_tokenize and other test modules.
@@ -452,7 +452,7 @@ class GrammarTests(unittest.TestCase):
def test_var_annot_in_module(self):
# check that functions fail the same way when executed
# outside of module where they were defined
- ann_module3 = import_helper.import_fresh_module("test.ann_module3")
+ ann_module3 = import_helper.import_fresh_module("test.typinganndata.ann_module3")
with self.assertRaises(NameError):
ann_module3.f_bad_ann()
with self.assertRaises(NameError):
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index 07c48ea..9cb92c0 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -4726,7 +4726,7 @@ class TestSignatureDefinitions(unittest.TestCase):
def test_base_class_have_text_signature(self):
# see issue 43118
- from test.ann_module7 import BufferedReader
+ from test.typinganndata.ann_module7 import BufferedReader
class MyBufferedReader(BufferedReader):
"""buffer reader class."""
diff --git a/Lib/test/test_module/__init__.py b/Lib/test/test_module/__init__.py
index cfc4d9c..2524e6c 100644
--- a/Lib/test/test_module/__init__.py
+++ b/Lib/test/test_module/__init__.py
@@ -324,7 +324,9 @@ a = A(destroyed)"""
del foo.__annotations__
def test_annotations_are_created_correctly(self):
- ann_module4 = import_helper.import_fresh_module('test.ann_module4')
+ ann_module4 = import_helper.import_fresh_module(
+ 'test.typinganndata.ann_module4',
+ )
self.assertTrue("__annotations__" in ann_module4.__dict__)
del ann_module4.__annotations__
self.assertFalse("__annotations__" in ann_module4.__dict__)
diff --git a/Lib/test/test_opcodes.py b/Lib/test/test_opcodes.py
index e880c3f..72488b2 100644
--- a/Lib/test/test_opcodes.py
+++ b/Lib/test/test_opcodes.py
@@ -1,7 +1,8 @@
# Python test set -- part 2, opcodes
import unittest
-from test import ann_module, support
+from test import support
+from test.typinganndata import ann_module
class OpcodeTest(unittest.TestCase):
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index fa39c79..38baf95 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -5377,7 +5377,7 @@ class AssertTypeTests(BaseTestCase):
# We need this to make sure that `@no_type_check` respects `__module__` attr:
-from test import ann_module8
+from test.typinganndata import ann_module8
@no_type_check
class NoTypeCheck_Outer:
@@ -5968,7 +5968,9 @@ class OverloadTests(BaseTestCase):
# Definitions needed for features introduced in Python 3.6
-from test import ann_module, ann_module2, ann_module3, ann_module5, ann_module6
+from test.typinganndata import (
+ ann_module, ann_module2, ann_module3, ann_module5, ann_module6,
+)
T_a = TypeVar('T_a')
diff --git a/Lib/test/ann_module.py b/Lib/test/typinganndata/ann_module.py
index 5081e6b..5081e6b 100644
--- a/Lib/test/ann_module.py
+++ b/Lib/test/typinganndata/ann_module.py
diff --git a/Lib/test/ann_module2.py b/Lib/test/typinganndata/ann_module2.py
index 76cf5b3..76cf5b3 100644
--- a/Lib/test/ann_module2.py
+++ b/Lib/test/typinganndata/ann_module2.py
diff --git a/Lib/test/ann_module3.py b/Lib/test/typinganndata/ann_module3.py
index eccd7be..eccd7be 100644
--- a/Lib/test/ann_module3.py
+++ b/Lib/test/typinganndata/ann_module3.py
diff --git a/Lib/test/ann_module4.py b/Lib/test/typinganndata/ann_module4.py
index 13e9aee..13e9aee 100644
--- a/Lib/test/ann_module4.py
+++ b/Lib/test/typinganndata/ann_module4.py
diff --git a/Lib/test/ann_module5.py b/Lib/test/typinganndata/ann_module5.py
index 837041e..837041e 100644
--- a/Lib/test/ann_module5.py
+++ b/Lib/test/typinganndata/ann_module5.py
diff --git a/Lib/test/ann_module6.py b/Lib/test/typinganndata/ann_module6.py
index 6791756..6791756 100644
--- a/Lib/test/ann_module6.py
+++ b/Lib/test/typinganndata/ann_module6.py
diff --git a/Lib/test/ann_module7.py b/Lib/test/typinganndata/ann_module7.py
index 8f890cd..8f890cd 100644
--- a/Lib/test/ann_module7.py
+++ b/Lib/test/typinganndata/ann_module7.py
diff --git a/Lib/test/ann_module8.py b/Lib/test/typinganndata/ann_module8.py
index bd03148..bd03148 100644
--- a/Lib/test/ann_module8.py
+++ b/Lib/test/typinganndata/ann_module8.py