Skip to content

Commit

Permalink
add a disabled test and make sure it does not list with the other uni…
Browse files Browse the repository at this point in the history
…t tests
  • Loading branch information
tsturge committed Oct 29, 2024
1 parent 2fb6b36 commit f071e08
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/functional/unit_testing/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,24 @@
- {c: 3}
"""

test_disabled_my_model_yml = """
unit_tests:
- name: test_disabled_my_model
model: my_model
config:
enabled: false
given:
- input: ref('my_model_a')
rows:
- {id: 1, a: 1}
- input: ref('my_model_b')
rows:
- {id: 1, b: 2}
- {id: 2, b: 2}
expect:
rows:
- {c: 3}
"""

test_my_model_simple_fixture_yml = """
unit_tests:
Expand Down
2 changes: 2 additions & 0 deletions tests/functional/unit_testing/test_ut_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
my_model_a_sql,
my_model_b_sql,
my_model_vars_sql,
test_disabled_my_model_yml,
test_my_model_yml,
)

Expand All @@ -21,6 +22,7 @@ def models(self):
"my_model_a.sql": my_model_a_sql,
"my_model_b.sql": my_model_b_sql,
"test_my_model.yml": test_my_model_yml + datetime_test,
"test_disabled_my_model.yml": test_disabled_my_model_yml
}

@pytest.fixture(scope="class")
Expand Down

0 comments on commit f071e08

Please sign in to comment.