summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_symtable.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-01-03 22:23:11 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-01-03 22:23:11 (GMT)
commitb462da8c0a5b0d9986b256fd8997f6e28616fb29 (patch)
treee5cccb45f525d22db981ae160a528b9b24134309 /Lib/test/test_symtable.py
parentee19c772cb5795cb3e435a6f85634f05bf3248a4 (diff)
downloadcpython-b462da8c0a5b0d9986b256fd8997f6e28616fb29.zip
cpython-b462da8c0a5b0d9986b256fd8997f6e28616fb29.tar.gz
cpython-b462da8c0a5b0d9986b256fd8997f6e28616fb29.tar.bz2
fix this to not depend on dictionary order
Diffstat (limited to 'Lib/test/test_symtable.py')
-rw-r--r--Lib/test/test_symtable.py8
1 files 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):