Skip to content

Commit 7b0feb0

Browse files
committed
Handling position changes in tests
1 parent b04b803 commit 7b0feb0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,16 @@ def test_parser(self):
7474

7575

7676
def check_dump(self, expected_output, actual_input):
77-
self.assertEqual(expected_output, dumps(actual_input))
77+
if isinstance(expected_output, list):
78+
self.assertIn(dumps(actual_input), expected_output)
79+
else:
80+
self.assertEqual(expected_output, dumps(actual_input))
7881

7982

8083
def test_dump(self):
8184
self.check_dump("#{1 2 3}",
8285
{1, 2, 3})
83-
self.check_dump('{:bar [1 2 3] "foo" :gone :a 1}',
86+
self.check_dump(['{:bar [1 2 3] "foo" :gone :a 1}', '{:a 1 "foo" :gone :bar [1 2 3]}'],
8487
{Keyword("a") : 1,
8588
"foo" : Keyword("gone"),
8689
Keyword("bar") : [1, 2, 3]})

0 commit comments

Comments
 (0)