mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +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
|
import threading
|
||||||
t=threading.Thread(target=TestThreadState)
|
t=threading.Thread(target=TestThreadState)
|
||||||
t.start()
|
t.start()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,8 @@ class TestTranforms(unittest.TestCase):
|
||||||
def test_none_as_constant(self):
|
def test_none_as_constant(self):
|
||||||
# LOAD_GLOBAL None --> LOAD_CONST None
|
# LOAD_GLOBAL None --> LOAD_CONST None
|
||||||
def f(x):
|
def f(x):
|
||||||
None
|
None
|
||||||
return x
|
return x
|
||||||
asm = disassemble(f)
|
asm = disassemble(f)
|
||||||
for elem in ('LOAD_GLOBAL',):
|
for elem in ('LOAD_GLOBAL',):
|
||||||
self.assert_(elem not in asm)
|
self.assert_(elem not in asm)
|
||||||
|
|
@ -53,9 +53,9 @@ class TestTranforms(unittest.TestCase):
|
||||||
def test_while_one(self):
|
def test_while_one(self):
|
||||||
# Skip over: LOAD_CONST trueconst JUMP_IF_FALSE xx POP_TOP
|
# Skip over: LOAD_CONST trueconst JUMP_IF_FALSE xx POP_TOP
|
||||||
def f():
|
def f():
|
||||||
while 1:
|
while 1:
|
||||||
pass
|
pass
|
||||||
return list
|
return list
|
||||||
asm = disassemble(f)
|
asm = disassemble(f)
|
||||||
for elem in ('LOAD_CONST', 'JUMP_IF_FALSE'):
|
for elem in ('LOAD_CONST', 'JUMP_IF_FALSE'):
|
||||||
self.assert_(elem not in asm)
|
self.assert_(elem not in asm)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue