aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_inspect/test_inspect.py
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2025-03-04 11:44:19 -0800
committerGitHub <noreply@github.com>2025-03-04 11:44:19 -0800
commitdc6d66f44c0a25b69dfec7e4ffc4a6fa5e4feada (patch)
tree045fed4b7965d56ea45c009dad6dddb42d7be8b0 /Lib/test/test_inspect/test_inspect.py
parente091520fdbcfe406e5fdcf66b7864b2b34a6726b (diff)
downloadcpython-dc6d66f44c0a25b69dfec7e4ffc4a6fa5e4feada.tar.gz
cpython-dc6d66f44c0a25b69dfec7e4ffc4a6fa5e4feada.zip
gh-105499: Merge typing.Union and types.UnionType (#105511)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Ken Jin <kenjin@python.org> Co-authored-by: Carl Meyer <carl@oddbird.net>
Diffstat (limited to 'Lib/test/test_inspect/test_inspect.py')
-rw-r--r--Lib/test/test_inspect/test_inspect.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_inspect/test_inspect.py b/Lib/test/test_inspect/test_inspect.py
index 03f2bacb3a4..73cf5ac64ee 100644
--- a/Lib/test/test_inspect/test_inspect.py
+++ b/Lib/test/test_inspect/test_inspect.py
@@ -1750,8 +1750,8 @@ class TestClassesAndFunctions(unittest.TestCase):
class TestFormatAnnotation(unittest.TestCase):
def test_typing_replacement(self):
from test.typinganndata.ann_module9 import ann, ann1
- self.assertEqual(inspect.formatannotation(ann), 'Union[List[str], int]')
- self.assertEqual(inspect.formatannotation(ann1), 'Union[List[testModule.typing.A], int]')
+ self.assertEqual(inspect.formatannotation(ann), 'List[str] | int')
+ self.assertEqual(inspect.formatannotation(ann1), 'List[testModule.typing.A] | int')
def test_forwardref(self):
fwdref = ForwardRef('fwdref')