fix this to not depend on dictionary order

This commit is contained in:
Benjamin Peterson 2012-01-03 16:23:11 -06:00
parent d76088d972
commit 5fc58c6321
1 changed files with 4 additions and 4 deletions

View File

@ -88,10 +88,10 @@ class SymtableTest(unittest.TestCase):
def test_function_info(self): def test_function_info(self):
func = self.spam func = self.spam
self.assertEqual(func.get_parameters(), ("a", "b", "kw", "var")) self.assertEqual(sorted(func.get_parameters()), ["a", "b", "kw", "var"])
self.assertEqual(func.get_locals(), expected = ["a", "b", "internal", "kw", "var", "x"]
("a", "b", "internal", "kw", "var", "x")) self.assertEqual(sorted(func.get_locals()), expected)
self.assertEqual(func.get_globals(), ("bar", "glob")) self.assertEqual(sorted(func.get_globals()), ["bar", "glob"])
self.assertEqual(self.internal.get_frees(), ("x",)) self.assertEqual(self.internal.get_frees(), ("x",))
def test_globals(self): def test_globals(self):