summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-10-22 11:22:50 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-10-22 11:22:50 (GMT)
commitaf7adad51d149e66ee3eb66c1765914f0fd7f905 (patch)
treebad46171fbca07a72f698e7a63e312fd952a5fd6 /Lib
parent42ead48dc17543c0d41d261fdf070a07f576c449 (diff)
downloadcpython-af7adad51d149e66ee3eb66c1765914f0fd7f905.zip
cpython-af7adad51d149e66ee3eb66c1765914f0fd7f905.tar.gz
cpython-af7adad51d149e66ee3eb66c1765914f0fd7f905.tar.bz2
Peephole constant folding had missed UNARY_POSITIVE.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_peepholer.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_peepholer.py b/Lib/test/test_peepholer.py
index 5696500..9e8bb69 100644
--- a/Lib/test/test_peepholer.py
+++ b/Lib/test/test_peepholer.py
@@ -150,6 +150,7 @@ class TestTranforms(unittest.TestCase):
for line, elem in (
('-0.5', '(-0.5)'), # unary negative
('~-2', '(1)'), # unary invert
+ ('+1', '(1)'), # unary positive
):
asm = dis_single(line)
self.assertTrue(elem in asm, asm)