-
Notifications
You must be signed in to change notification settings - Fork 74
Conversation
…ror as "mockTarget" is not created by ProjectTemporaryDirectory().
projects/adapter/tests/test_cli.py
Outdated
@@ -252,7 +252,7 @@ def test_selection(capfd): | |||
|
|||
def test_no_run_results(capfd): | |||
with ProjectTemporaryDirectory() as tmp_dir: | |||
shutil.rmtree(os.path.join(tmp_dir, "mockTarget")) | |||
shutil.rmtree(os.path.join(tmp_dir, "mockTarget"), ignore_errors=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems sketchy! Why do we have to ignore errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I should have deleted the line instead. ProjectTemporaryDirectory() creates the temp directory but without mockTarget
, yet rmtree
will try to delete the entire tree assuming mockTarget
exists, but as it doesn't, an exception is thrown. Unsure why this line was put there in the first place. I added ignore_errors as the rmtree API has been updated; perhaps this is a new python 3.11 behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@squat I've updated this test to check for the directory's existence first.
Description
This PR is building upon the work @salimmoulouel started with PR #919. There's a fix to limit Google protobuf version which this project doesn't use but dbt-core does; dbt-core is fixing that in version 1.8; as this PR is still focused on 1.7.x I've added it here.
resolves
#909
#880
#914
Integration tests
Adapter to test:
Python version to test: