mirror of
https://github.com/python/cpython.git
synced 2024-12-17 22:05:04 +08:00
Whitespace normalization.
This commit is contained in:
parent
333da5f000
commit
7f06187d31
@ -352,7 +352,7 @@ class BuiltinTest(unittest.TestCase):
|
|||||||
if numruns:
|
if numruns:
|
||||||
return
|
return
|
||||||
numruns += 1
|
numruns += 1
|
||||||
|
|
||||||
globals = {'a': 1, 'b': 2}
|
globals = {'a': 1, 'b': 2}
|
||||||
locals = {'b': 200, 'c': 300}
|
locals = {'b': 200, 'c': 300}
|
||||||
|
|
||||||
@ -862,12 +862,12 @@ class BuiltinTest(unittest.TestCase):
|
|||||||
"max(1, 2, key=int, abc=int)", # two many keywords
|
"max(1, 2, key=int, abc=int)", # two many keywords
|
||||||
"max(1, 2, key=1)", # keyfunc is not callable
|
"max(1, 2, key=1)", # keyfunc is not callable
|
||||||
):
|
):
|
||||||
try:
|
try:
|
||||||
exec(stmt) in globals()
|
exec(stmt) in globals()
|
||||||
except TypeError:
|
except TypeError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
self.fail(stmt)
|
self.fail(stmt)
|
||||||
|
|
||||||
self.assertEqual(max((1,), key=neg), 1) # one elem iterable
|
self.assertEqual(max((1,), key=neg), 1) # one elem iterable
|
||||||
self.assertEqual(max((1,2), key=neg), 1) # two elem iterable
|
self.assertEqual(max((1,2), key=neg), 1) # two elem iterable
|
||||||
@ -908,12 +908,12 @@ class BuiltinTest(unittest.TestCase):
|
|||||||
"min(1, 2, key=int, abc=int)", # two many keywords
|
"min(1, 2, key=int, abc=int)", # two many keywords
|
||||||
"min(1, 2, key=1)", # keyfunc is not callable
|
"min(1, 2, key=1)", # keyfunc is not callable
|
||||||
):
|
):
|
||||||
try:
|
try:
|
||||||
exec(stmt) in globals()
|
exec(stmt) in globals()
|
||||||
except TypeError:
|
except TypeError:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
self.fail(stmt)
|
self.fail(stmt)
|
||||||
|
|
||||||
self.assertEqual(min((1,), key=neg), 1) # one elem iterable
|
self.assertEqual(min((1,), key=neg), 1) # one elem iterable
|
||||||
self.assertEqual(min((1,2), key=neg), 2) # two elem iterable
|
self.assertEqual(min((1,2), key=neg), 2) # two elem iterable
|
||||||
|
Loading…
Reference in New Issue
Block a user