[Python-checkins] cpython (3.1): fix this to not depend on dictionary order
benjamin.peterson
python-checkins at python.org
Tue Jan 3 23:28:53 CET 2012
http://hg.python.org/cpython/rev/fb5707168351
changeset: 74253:fb5707168351
branch: 3.1
parent: 71565:1b3c21b12e92
user: Benjamin Peterson <benjamin at python.org>
date: Tue Jan 03 16:23:11 2012 -0600
summary:
fix this to not depend on dictionary order
files:
Lib/test/test_symtable.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Lib/test/test_symtable.py b/Lib/test/test_symtable.py
--- a/Lib/test/test_symtable.py
+++ b/Lib/test/test_symtable.py
@@ -80,10 +80,10 @@
def test_function_info(self):
func = self.spam
- self.assertEqual(func.get_parameters(), ("a", "b", "kw", "var"))
- self.assertEqual(func.get_locals(),
- ("a", "b", "bar", "glob", "internal", "kw", "var", "x"))
- self.assertEqual(func.get_globals(), ("bar", "glob"))
+ self.assertEqual(sorted(func.get_parameters()), ["a", "b", "kw", "var"])
+ expected = ["a", "b", "bar", "glob", "internal", "kw", "var", "x"]
+ self.assertEqual(sorted(func.get_locals()), expected)
+ self.assertEqual(sorted(func.get_globals()), ["bar", "glob"])
self.assertEqual(self.internal.get_frees(), ("x",))
def test_globals(self):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list