]> granicus.if.org Git - python/commitdiff
dict_constructor(): The last test was passing for the wrong reason (it
authorTim Peters <tim.peters@gmail.com>
Fri, 26 Oct 2001 20:57:38 +0000 (20:57 +0000)
committerTim Peters <tim.peters@gmail.com>
Fri, 26 Oct 2001 20:57:38 +0000 (20:57 +0000)
was intended to verify that sub-sequences of lengths 1 and 3 raise
ValueError, but was actually testing string lengths).

Lib/test/test_descr.py

index 230d6a16c8cc43d750cdfd10e01e355f11f47b37..f5daf261dd7de0909c462ccce5d694c728c54cb6 100644 (file)
@@ -247,7 +247,7 @@ def dict_constructor():
     vereq(d, dictionary([(i, i+1) for i in range(4)]))
 
     # Bad sequence lengths.
-    for bad in ['tooshort'], ['too', 'long', 'by 1']:
+    for bad in [('tooshort',)], [('too', 'long', 'by 1')]:
         try:
             dictionary(bad)
         except ValueError: