mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
bpo-44761: Change default value of NewType __module__ attr (GH-27406)
This commit is contained in:
parent
6ff8903809
commit
7b975f81e4
2 changed files with 12 additions and 4 deletions
|
|
@ -3777,6 +3777,12 @@ def test_pickle(self):
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue