From ccb5659db2c34bb6a9d014b34ed816fa07ccfc5e Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Wed, 8 Feb 2023 17:45:43 -0800 Subject: [PATCH] Use dbtUsageException --- .../adapter/dbt/tests/adapter/dbt_debug/test_dbt_debug.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/adapter/dbt/tests/adapter/dbt_debug/test_dbt_debug.py b/tests/adapter/dbt/tests/adapter/dbt_debug/test_dbt_debug.py index 8d3fd7751f2..e2b9beea351 100644 --- a/tests/adapter/dbt/tests/adapter/dbt_debug/test_dbt_debug.py +++ b/tests/adapter/dbt/tests/adapter/dbt_debug/test_dbt_debug.py @@ -2,6 +2,8 @@ import os import re import yaml + +from dbt.cli.main import dbtUsageException from dbt.tests.util import run_dbt MODELS__MODEL_SQL = """ @@ -86,9 +88,8 @@ def test_badproject(self, project): self.check_project(splitout) def test_not_found_project(self, project): - run_dbt(["debug", "--project-dir", "nopass"], expect_pass=False) - splitout = self.capsys.readouterr().out.split("\n") - self.check_project(splitout, msg="ERROR not found") + with pytest.raises(dbtUsageException): + run_dbt(["debug", "--project-dir", "nopass"]) def test_invalid_project_outside_current_dir(self, project): # create a dbt_project.yml