[Python-checkins] python/dist/src/Lib/test test_peepholer.py, 1.4,
1.5
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Tue Nov 2 05:20:12 CET 2004
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8045/Lib/test
Modified Files:
test_peepholer.py
Log Message:
Maintain peepholer's cumlc invariant by updating the running total
everytime a LOAD_CONSTANT is encountered, created, or overwritten.
Added two tests to cover cases affected by the patch.
Index: test_peepholer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_peepholer.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- test_peepholer.py 26 Oct 2004 08:59:14 -0000 1.4
+++ test_peepholer.py 2 Nov 2004 04:20:10 -0000 1.5
@@ -75,9 +75,11 @@
def test_folding_of_tuples_of_constants(self):
for line, elem in (
- ('a = 1,2,3', '((1, 2, 3))',),
- ('("a","b","c")', "(('a', 'b', 'c'))",),
- ('a,b,c = 1,2,3', '((1, 2, 3))',),
+ ('a = 1,2,3', '((1, 2, 3))'),
+ ('("a","b","c")', "(('a', 'b', 'c'))"),
+ ('a,b,c = 1,2,3', '((1, 2, 3))'),
+ ('(None, 1, None)', '((None, 1, None))'),
+ ('((1, 2), 3, 4)', '(((1, 2), 3, 4))'),
):
asm = dis_single(line)
self.assert_(elem in asm)
More information about the Python-checkins
mailing list