summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_peepholer.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_peepholer.py')
-rw-r--r--Lib/test/test_peepholer.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_peepholer.py b/Lib/test/test_peepholer.py
index 34bd99f..bedf763 100644
--- a/Lib/test/test_peepholer.py
+++ b/Lib/test/test_peepholer.py
@@ -133,6 +133,16 @@ class TestTranforms(unittest.TestCase):
asm = dis_single('a="x"*1000')
self.assert_('(1000)' in asm)
+ def test_set_conversion(self):
+ for line in (
+ 'x in (1,2,3)',
+ 'x not in (1,2,3)',
+ 'not x in (1,2,3)',
+ 'not x not in (1,2,3)',
+ ):
+ asm = dis_single(line)
+ self.assert_('frozenset' in asm)
+
def test_elim_extra_return(self):
# RETURN LOAD_CONST None RETURN --> RETURN
def f(x):