Skip to content

Commit

Permalink
style(unit_test): avoid if continue
Browse files Browse the repository at this point in the history
  • Loading branch information
devmessias committed Nov 11, 2024
1 parent c98293b commit f155805
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/dbt/parser/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,15 @@ def parse_unit_test_case(self, test_case: UnitTestDefinition):
defer_relation=original_input_node.defer_relation,
)

if not resource_type == NodeType.Model:
continue
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#L166

Added line #L166 was not covered by tests
elif resource_type in (NodeType.Seed, NodeType.Snapshot):
input_node = ModelNode(

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
**common_fields,
defer_relation=original_input_node.defer_relation,
)

elif resource_type == NodeType.Source:
# We are reusing the database/schema/identifier from the original source,
Expand Down

0 comments on commit f155805

Please sign in to comment.