Peephole constant folding had missed UNARY_POSITIVE.

This commit is contained in:
Raymond Hettinger 2009-10-22 11:22:50 +00:00
parent 42ead48dc1
commit af7adad51d
3 changed files with 7 additions and 0 deletions

View file

@ -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)