Skip to content

Commit e98118f

Browse files
pombredanneJonoYang
authored andcommitted
Output verbose test failure #589
Reference: #589 Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 7993df6 commit e98118f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

minecode/tests/miners/test_maven.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,10 +579,18 @@ def test_visit_and_map_with_index(self):
579579
else:
580580
visited = ResourceURI.objects.all().order_by("uri")
581581

582-
uri_results = list(model_to_dict(rec, exclude=["id"]) for rec in visited)
582+
# sort for stable order across OSes
583+
# https://github.com/aboutcode-org/purldb/issues/589
584+
uri_results = sorted(
585+
model_to_dict(rec, exclude=["id"]).items() for rec in visited
586+
)
587+
uri_results = [dict(i) for i in uri_results]
588+
583589
expected_loc = self.get_test_loc(
584590
"maven/end2end_index/expected_visited_increment_index.json"
585591
)
592+
593+
self.maxDiff = None
586594
self.check_expected_results(uri_results, expected_loc, regen=FIXTURES_REGEN)
587595

588596

0 commit comments

Comments
 (0)