Skip to content

Commit 760cd9c

Browse files
committed
fix(tests): moving test select-model to test_test
Signed-off-by: Cortland Goffena <30168413+cmgoffena13@users.noreply.github.com>
1 parent 5b899c2 commit 760cd9c

2 files changed

Lines changed: 9 additions & 21 deletions

File tree

‎tests/cli/test_cli.py‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -286,27 +286,6 @@ def test_plan_select_model_test_changed_only_scopes_tests(runner, tmp_path):
286286
assert "Skipped 1 tests" in result.output
287287

288288

289-
def test_test_select_model(runner, tmp_path):
290-
create_example_project(tmp_path)
291-
init_prod_and_backfill(runner, tmp_path)
292-
293-
result = runner.invoke(
294-
cli,
295-
[
296-
"--log-file-dir",
297-
tmp_path,
298-
"--paths",
299-
tmp_path,
300-
"test",
301-
"--select-model",
302-
"sqlmesh_example.full_model",
303-
],
304-
)
305-
assert result.exit_code == 0
306-
assert "Successfully Ran 1 tests against duckdb" in result.output
307-
assert "Skipped 1 tests" in result.output
308-
309-
310289
def test_plan_skip_linter(runner, tmp_path):
311290
create_example_project(tmp_path)
312291

‎tests/core/test_test.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3553,3 +3553,12 @@ def test_filter_tests_by_model_names():
35533553
dialect="duckdb",
35543554
)
35553555
assert [t.test_name for t in filtered_short] == ["t1"]
3556+
3557+
3558+
def test_test_select_model(tmp_path: Path) -> None:
3559+
init_example_project(tmp_path, engine_type="duckdb")
3560+
context = Context(paths=tmp_path)
3561+
3562+
results = context.test(model_names=["sqlmesh_example.full_model"])
3563+
assert len(results.successes) == 1
3564+
assert results.tests_skipped == 1

0 commit comments

Comments
 (0)