Skip to content

Commit

Permalink
Align with order of unit test output when actual differs from `expe…
Browse files Browse the repository at this point in the history
…cted` (#9406)

* Align with order of unit test output when `actual` differs from `expected`

* Changelog entry
  • Loading branch information
dbeatty10 authored Jan 22, 2024
1 parent 2a5ad17 commit c547aac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20240118-135651.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Align with order of unit test output when `actual` differs from `expected`
time: 2024-01-18T13:56:51.131001-07:00
custom:
Author: dbeatty10
Issue: "9370"
2 changes: 1 addition & 1 deletion core/dbt/task/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def execute_unit_test(
if daff_diff.hasDifference():
should_error = True
rendered = self._render_daff_diff(daff_diff)
rendered = f"\n\n{red('expected')} differs from {green('actual')}:\n\n{rendered}\n"
rendered = f"\n\n{green('actual')} differs from {red('expected')}:\n\n{rendered}\n"

diff = UnitTestDiff(
actual=json_rows_from_table(actual),
Expand Down

0 comments on commit c547aac

Please sign in to comment.