]> granicus.if.org Git - python/commitdiff
don't rely on dict order
authorBenjamin Peterson <benjamin@python.org>
Tue, 21 Feb 2012 05:15:10 +0000 (00:15 -0500)
committerBenjamin Peterson <benjamin@python.org>
Tue, 21 Feb 2012 05:15:10 +0000 (00:15 -0500)
Lib/lib-tk/test/test_ttk/test_functions.py

index 9de25a445fe80512b61851aa1f73118df746b68d..15e76c1ed1d4487857d908d120dc35df6daf52b7 100644 (file)
@@ -143,8 +143,10 @@ class InternalFunctionsTest(unittest.TestCase):
         self.assertEqual(ttk._format_elemcreate('image', False, 'test',
             ('a', 'b', 'c')), ("test {a b} c", ()))
         # state spec and options
-        self.assertEqual(ttk._format_elemcreate('image', False, 'test',
-            ('a', 'b'), a='x', b='y'), ("test a b", ("-a", "x", "-b", "y")))
+        res = ttk._format_elemcreate('image', False, 'test',
+                                     ('a', 'b'), a='x', b='y')
+        self.assertEqual(res[0], "test a b")
+        self.assertEqual(set(res[1]), {"-a", "x", "-b", "y"})
         # format returned values as a tcl script
         # state spec with multiple states and an option with a multivalue
         self.assertEqual(ttk._format_elemcreate('image', True, 'test',