Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b462da8

Browse files
committed
fix this to not depend on dictionary order
1 parent ee19c77 commit b462da8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/test/test_symtable.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ def test_lineno(self):
8080

8181
def test_function_info(self):
8282
func = self.spam
83-
self.assertEqual(func.get_parameters(), ("a", "b", "kw", "var"))
84-
self.assertEqual(func.get_locals(),
85-
("a", "b", "bar", "glob", "internal", "kw", "var", "x"))
86-
self.assertEqual(func.get_globals(), ("bar", "glob"))
83+
self.assertEqual(sorted(func.get_parameters()), ["a", "b", "kw", "var"])
84+
expected = ["a", "b", "bar", "glob", "internal", "kw", "var", "x"]
85+
self.assertEqual(sorted(func.get_locals()), expected)
86+
self.assertEqual(sorted(func.get_globals()), ["bar", "glob"])
8787
self.assertEqual(self.internal.get_frees(), ("x",))
8888

8989
def test_globals(self):

0 commit comments

Comments
 (0)