From b462da8c0a5b0d9986b256fd8997f6e28616fb29 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 3 Jan 2012 16:23:11 -0600 Subject: fix this to not depend on dictionary order --- Lib/test/test_symtable.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/test/test_symtable.py b/Lib/test/test_symtable.py index 3e62d96..882fa6f 100644 --- a/Lib/test/test_symtable.py +++ b/Lib/test/test_symtable.py @@ -80,10 +80,10 @@ class SymtableTest(unittest.TestCase): 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): -- cgit v0.12