]> granicus.if.org Git - python/commitdiff
Test case to cover subscription bug from SF 1333982
authorJeremy Hylton <jeremy@alum.mit.edu>
Tue, 28 Feb 2006 17:46:23 +0000 (17:46 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Tue, 28 Feb 2006 17:46:23 +0000 (17:46 +0000)
Lib/test/output/test_grammar
Lib/test/test_grammar.py

index fed41973d826526dcd8028ccbcec3e16653fd302..4fa9cb03c9864f06671d148efb8a43ec05c74831 100644 (file)
@@ -55,6 +55,7 @@ multiplicative ops
 unary ops
 selectors
 
+[1, (1,), (1, 2), (1, 2, 3)]
 atoms
 classdef
 ['Apple', 'Banana', 'Coco  nut']
index 0d2d9255df34a42090d0ec31f934b7a1de15c506..b7c2a23637ea5e142a8d93b2faec20247fa186d3 100644 (file)
@@ -663,6 +663,17 @@ s = a[:]
 s = a[-5:]
 s = a[:-1]
 s = a[-4:-3]
+# A rough test of SF bug XXX.
+# The testing here is fairly incomplete.
+d = {}
+d[1] = 1
+d[1,] = 2
+d[1,2] = 3
+d[1,2,3] = 4
+L = list(d)
+L.sort()
+print L
+
 
 print 'atoms'
 ### atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' | '`' testlist '`' | NAME | NUMBER | STRING