Skip to content

Commit

Permalink
Tweak test to avoid set ordering problem (dbt-labs#5272)
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank authored and Axel Goblet committed May 20, 2022
1 parent 66d7739 commit a947031
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220518-145522.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Fix test for context set function
time: 2022-05-18T14:55:22.554316-04:00
custom:
Author: gshank
Issue: "5266"
PR: "5272"
7 changes: 4 additions & 3 deletions tests/functional/context_methods/test_builtin_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ def macros(self):
def test_builtin_set_function(self, project):
_, log_output = run_dbt_and_capture(["--debug", "run-operation", "validate_set"])

expected_set = {False, 1, 2, 3, "foo"}
assert f"set_result: {expected_set}" in log_output
assert f"try_set_result: {expected_set}" in log_output
# The order of the set isn't guaranteed so we can't check for the actual set in the logs
assert "set_result: " in log_output
assert "False" in log_output
assert "try_set_result: " in log_output

def test_builtin_zip_function(self, project):
_, log_output = run_dbt_and_capture(["--debug", "run-operation", "validate_zip"])
Expand Down

0 comments on commit a947031

Please sign in to comment.