Skip to content

Commit

Permalink
Sort PyUnit test results
Browse files Browse the repository at this point in the history
Since PyUnit already sorts the results based on the test method, this sorting is useful in cases where multiple test classes are present in a single file and when we want to have a consistent sorting across all test classes.
  • Loading branch information
MrSerth committed Oct 23, 2024
1 parent 907249a commit b12f1e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/py_unit_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ def parse_output(output)
count += total_failed
end

{count:, failed: total_failed, error_messages: assertion_error_matches.flatten.compact_blank}.compact_blank
{count:, failed: total_failed, error_messages: assertion_error_matches.flatten.compact_blank.sort}.compact_blank
end
end

0 comments on commit b12f1e0

Please sign in to comment.