mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-43102: Set namedtuple __new__'s internal builtins to a dict. (GH-24439)
This commit is contained in:
parent
196d4deaf4
commit
b6d68aa08b
3 changed files with 8 additions and 1 deletions
|
@ -681,6 +681,11 @@ class TestNamedTuple(unittest.TestCase):
|
|||
self.assertEqual(np.x, 1)
|
||||
self.assertEqual(np.y, 2)
|
||||
|
||||
def test_new_builtins_issue_43102(self):
|
||||
self.assertEqual(
|
||||
namedtuple('C', ()).__new__.__globals__['__builtins__'],
|
||||
{})
|
||||
|
||||
|
||||
################################################################################
|
||||
### Abstract Base Classes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue