mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Whitespace normalization.
This commit is contained in:
parent
5b799c1f3d
commit
66cb018c96
4 changed files with 33 additions and 34 deletions
|
|
@ -46,4 +46,3 @@ if have_thread_state:
|
|||
import threading
|
||||
t=threading.Thread(target=TestThreadState)
|
||||
t.start()
|
||||
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ class TestTranforms(unittest.TestCase):
|
|||
def test_none_as_constant(self):
|
||||
# LOAD_GLOBAL None --> LOAD_CONST None
|
||||
def f(x):
|
||||
None
|
||||
return x
|
||||
None
|
||||
return x
|
||||
asm = disassemble(f)
|
||||
for elem in ('LOAD_GLOBAL',):
|
||||
self.assert_(elem not in asm)
|
||||
|
|
@ -53,9 +53,9 @@ class TestTranforms(unittest.TestCase):
|
|||
def test_while_one(self):
|
||||
# Skip over: LOAD_CONST trueconst JUMP_IF_FALSE xx POP_TOP
|
||||
def f():
|
||||
while 1:
|
||||
pass
|
||||
return list
|
||||
while 1:
|
||||
pass
|
||||
return list
|
||||
asm = disassemble(f)
|
||||
for elem in ('LOAD_CONST', 'JUMP_IF_FALSE'):
|
||||
self.assert_(elem not in asm)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue