mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Peephole constant folding had missed UNARY_POSITIVE.
This commit is contained in:
parent
42ead48dc1
commit
af7adad51d
3 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue