Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak test to avoid set ordering problem #5272

Merged
merged 1 commit into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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