Skip to content

Commit

Permalink
doc: temp change to illustrate a point
Browse files Browse the repository at this point in the history
  • Loading branch information
devmessias committed Oct 14, 2024
1 parent 40c350f commit f6088db
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/dbt/parser/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@ def parse_unit_test_case(self, test_case: UnitTestDefinition):
self.manifest,
test_case.package_name,
)

# just to illustrate the issue in #..., but this change is obviously not
# the correct solution. I’ll wait for a discussion before writing any more
# advanced code.

if "var" not in ctx:
ctx["var"] = lambda var_name, default =None: default
if "env_var" not in ctx:
ctx["env_var"] = lambda var_name, default=None: default

Check warning on line 115 in core/dbt/parser/unit_tests.py

View check run for this annotation

Codecov / codecov/patch

core/dbt/parser/unit_tests.py#L112-L115

Added lines #L112 - L115 were not covered by tests
get_rendered(unit_test_node.raw_code, ctx, unit_test_node, capture_macros=True)
# unit_test_node now has a populated refs/sources

Expand Down

0 comments on commit f6088db

Please sign in to comment.