don't rely on dict order

This commit is contained in:
Benjamin Peterson 2012-02-21 00:15:10 -05:00
parent c59df7d4e9
commit c7bbd7be94
1 changed files with 4 additions and 2 deletions

View File

@ -143,8 +143,10 @@ class InternalFunctionsTest(unittest.TestCase):
self.assertEqual(ttk._format_elemcreate('image', False, 'test', self.assertEqual(ttk._format_elemcreate('image', False, 'test',
('a', 'b', 'c')), ("test {a b} c", ())) ('a', 'b', 'c')), ("test {a b} c", ()))
# state spec and options # state spec and options
self.assertEqual(ttk._format_elemcreate('image', False, 'test', res = ttk._format_elemcreate('image', False, 'test',
('a', 'b'), a='x', b='y'), ("test a b", ("-a", "x", "-b", "y"))) ('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 # format returned values as a tcl script
# state spec with multiple states and an option with a multivalue # state spec with multiple states and an option with a multivalue
self.assertEqual(ttk._format_elemcreate('image', True, 'test', self.assertEqual(ttk._format_elemcreate('image', True, 'test',