From 01cb67900cba7271c9881dba8ba0f6650eabe14e Mon Sep 17 00:00:00 2001 From: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:55:18 -0700 Subject: [PATCH] fix failing test_cancel in 3.12 (#1322) * use dynamic schema in test_grant_access_to.py * use dynamic schema in test_grant_access_to.py * revert setup * Specify env in test_cancel subprocess call * remove chdir from test_cancel.py * pip install dev-requirements.txt in github actions worker * experimental updates to debug in github actions * experimental updates to debug in github actions * specify dbt exec path * experiment * remove editable install * remove tmate * remove maxfail * remove unnecessary install --- tests/functional/test_cancel.py | 3 ++- tox.ini | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/functional/test_cancel.py b/tests/functional/test_cancel.py index c026d76d6..823687b52 100644 --- a/tests/functional/test_cancel.py +++ b/tests/functional/test_cancel.py @@ -63,7 +63,7 @@ def _get_info_schema_jobs_query(project_id, dataset_id, table_id): def _run_dbt_in_subprocess(project, dbt_command): - os.chdir(project.project_root) + run_dbt_process = subprocess.Popen( [ "dbt", @@ -76,6 +76,7 @@ def _run_dbt_in_subprocess(project, dbt_command): stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False, + env=os.environ.copy(), ) std_out_log = "" while True: diff --git a/tox.ini b/tox.ini index 08cd20413..b388dc5b3 100644 --- a/tox.ini +++ b/tox.ini @@ -31,7 +31,7 @@ commands = bigquery: {envpython} -m pytest -n auto {posargs} -vv tests/functional -k "not TestPython" --profile service_account deps = -rdev-requirements.txt - -e. + . [testenv:{python-tests,py38,py39,py310,py311,py312,py}] description = python integration testing