mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
merge 3.5 (#11205)
This commit is contained in:
commit
2ec8f9bffc
6 changed files with 127 additions and 113 deletions
|
@ -461,6 +461,17 @@ if 1:
|
|||
ast.body = [_ast.BoolOp()]
|
||||
self.assertRaises(TypeError, compile, ast, '<ast>', 'exec')
|
||||
|
||||
def test_dict_evaluation_order(self):
|
||||
i = 0
|
||||
|
||||
def f():
|
||||
nonlocal i
|
||||
i += 1
|
||||
return i
|
||||
|
||||
d = {f(): f(), f(): f()}
|
||||
self.assertEqual(d, {1: 2, 3: 4})
|
||||
|
||||
@support.cpython_only
|
||||
def test_same_filename_used(self):
|
||||
s = """def f(): pass\ndef g(): pass"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue