[Python-checkins] cpython (2.7): don't rely on dict order
benjamin.peterson
python-checkins at python.org
Tue Feb 21 06:15:17 CET 2012
http://hg.python.org/cpython/rev/d42842083dcf
changeset: 75114:d42842083dcf
branch: 2.7
user: Benjamin Peterson <benjamin at python.org>
date: Tue Feb 21 00:15:10 2012 -0500
summary:
don't rely on dict order
files:
Lib/lib-tk/test/test_ttk/test_functions.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Lib/lib-tk/test/test_ttk/test_functions.py b/Lib/lib-tk/test/test_ttk/test_functions.py
--- a/Lib/lib-tk/test/test_ttk/test_functions.py
+++ b/Lib/lib-tk/test/test_ttk/test_functions.py
@@ -143,8 +143,10 @@
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',
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list