diff options
author | Yurii Karabas <1998uriyyo@gmail.com> | 2021-07-30 12:56:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-30 12:56:12 (GMT) |
commit | 7b975f81e4dba70a42c6279539a7fcfe4211b4c0 (patch) | |
tree | 2d4537b5f27925541c842286170601906a0dde7f /Lib/test/test_typing.py | |
parent | 6ff890380971752299325bd28eab80ec936975cf (diff) | |
download | cpython-7b975f81e4dba70a42c6279539a7fcfe4211b4c0.zip cpython-7b975f81e4dba70a42c6279539a7fcfe4211b4c0.tar.gz cpython-7b975f81e4dba70a42c6279539a7fcfe4211b4c0.tar.bz2 |
bpo-44761: Change default value of NewType __module__ attr (GH-27406)
Diffstat (limited to 'Lib/test/test_typing.py')
-rw-r--r-- | Lib/test/test_typing.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index bc9021a..06bd49b 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -3777,6 +3777,12 @@ class NewTypeTests: with self.assertRaises(pickle.PicklingError): pickle.dumps(UserAge, proto) + def test_missing__name__(self): + code = ("import typing\n" + "NT = typing.NewType('NT', int)\n" + ) + exec(code, {}) + class NewTypePythonTests(NewTypeTests, BaseTestCase): module = py_typing |