Commit c7bbd7be authored by Benjamin Peterson's avatar Benjamin Peterson

don't rely on dict order

parent c59df7d4
......@@ -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',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment