[Python-checkins] r66066 - sandbox/trunk/ttk-gsoc/src/2.x/test/test_functions.py

guilherme.polo python-checkins at python.org
Sat Aug 30 14:21:39 CEST 2008


Author: guilherme.polo
Date: Sat Aug 30 14:21:38 2008
New Revision: 66066

Log:
Removed a duplicated test and minor test adjustment;


Modified:
   sandbox/trunk/ttk-gsoc/src/2.x/test/test_functions.py

Modified: sandbox/trunk/ttk-gsoc/src/2.x/test/test_functions.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/src/2.x/test/test_functions.py	(original)
+++ sandbox/trunk/ttk-gsoc/src/2.x/test/test_functions.py	Sat Aug 30 14:21:38 2008
@@ -205,11 +205,7 @@
         # empty layout
         self.failUnlessEqual(ttk._format_layoutlist([])[0], '')
 
-        # _format_layoutlist always expects the second item (in every item)
-        # to act like a dict (except when the value evalutes to False).
-        self.failUnlessRaises(AttributeError,
-            ttk._format_layoutlist, [('a', 'b')])
-
+        # smallest (after an empty one) acceptable layout
         smallest = ttk._format_layoutlist([('a', None)], indent=0)
         self.failUnlessEqual(smallest,
             ttk._format_layoutlist([('a', '')], indent=0))
@@ -222,14 +218,16 @@
             self.failUnlessEqual(sample(i, i), sample_expected(i, i))
 
         # invalid layout format, different kind of exceptions will be
-        # raised by internal functions
+        # raised
 
         # plain wrong format
         self.failUnlessRaises(ValueError, ttk._format_layoutlist,
             ['bad', 'format'])
-        # will try to use iteritems in the 'bad' string
-        self.failUnlessRaises(AttributeError, ttk._format_layoutlist,
-            [('name', 'bad')])
+        self.failUnlessRaises(TypeError, ttk._format_layoutlist, None)
+        # _format_layoutlist always expects the second item (in every item)
+        # to act like a dict (except when the value evalutes to False).
+        self.failUnlessRaises(AttributeError,
+            ttk._format_layoutlist, [('a', 'b')])
         # bad children formatting
         self.failUnlessRaises(ValueError, ttk._format_layoutlist,
             [('name', {'children': {'a': None}})])


More information about the Python-checkins mailing list