Skip to content

Commit

Permalink
fix: wrong conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
devmessias committed Nov 13, 2024
1 parent f155805 commit 82b2056
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions core/dbt/parser/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,11 @@ def parse_unit_test_case(self, test_case: UnitTestDefinition):
**common_fields,
defer_relation=original_input_node.defer_relation,
)

if original_input_node.version:
input_node.version = original_input_node.version
if original_input_node.latest_version:
input_node.latest_version = original_input_node.latest_version
elif resource_type in (NodeType.Seed, NodeType.Snapshot):
input_node = ModelNode(
**common_fields,
defer_relation=original_input_node.defer_relation,
)
if resource_type == NodeType.Model:
if original_input_node.version:
input_node.version = original_input_node.version
if original_input_node.latest_version:
input_node.latest_version = original_input_node.latest_version

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

View check run for this annotation

Codecov / codecov/patch

core/dbt/parser/unit_tests.py#L162-L166

Added lines #L162 - L166 were not covered by tests

elif resource_type == NodeType.Source:

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

View check run for this annotation

Codecov / codecov/patch

core/dbt/parser/unit_tests.py#L168

Added line #L168 was not covered by tests
# We are reusing the database/schema/identifier from the original source,
Expand Down

0 comments on commit 82b2056

Please sign in to comment.