summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_peepholer.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2007-03-02 19:20:46 (GMT)
committerRaymond Hettinger <python@rcn.com>2007-03-02 19:20:46 (GMT)
commit20e1199fbe8493796a12d1c20ee1c857527fe396 (patch)
tree15f6cb86c5d952f2b69e0bad1a1d7e8660fa8a61 /Lib/test/test_peepholer.py
parent117a05ed502dc292a2e8ee5ff8c4cded55af1c61 (diff)
downloadcpython-20e1199fbe8493796a12d1c20ee1c857527fe396.zip
cpython-20e1199fbe8493796a12d1c20ee1c857527fe396.tar.gz
cpython-20e1199fbe8493796a12d1c20ee1c857527fe396.tar.bz2
Fix embarrassing typo and fix constantification of None
Diffstat (limited to 'Lib/test/test_peepholer.py')
-rw-r--r--Lib/test/test_peepholer.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_peepholer.py b/Lib/test/test_peepholer.py
index 02b04e0..c547984 100644
--- a/Lib/test/test_peepholer.py
+++ b/Lib/test/test_peepholer.py
@@ -49,6 +49,11 @@ class TestTranforms(unittest.TestCase):
self.assert_(elem not in asm)
for elem in ('LOAD_CONST', '(None)'):
self.assert_(elem in asm)
+ def f():
+ 'Adding a docstring made this test fail in Py2.5.0'
+ return None
+ self.assert_('LOAD_CONST' in disassemble(f))
+ self.assert_('LOAD_GLOBAL' not in disassemble(f))
def test_while_one(self):
# Skip over: LOAD_CONST trueconst JUMP_IF_FALSE xx POP_TOP