-
Notifications
You must be signed in to change notification settings - Fork 133
Update conftest.py #4306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update conftest.py #4306
Conversation
lennartkats-db
left a comment
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.
Please review, I'm not sure these changes are needed?
| """Configure pytest session.""" | ||
| with _allow_stderr_output(config): | ||
| src_path = pathlib.Path(__file__).parent.parent / "src" | ||
| sys.path.insert(0, str(src_path)) |
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 line doesn't seem right to me, could you look at alternative options for your test runner instead? Normally imports in tests just work out of the box, as seen at https://github.com/databricks/bundle-examples/blob/333bab00d7dc17aa3d2491f3a9d1883590984793/default_python/tests/sample_taxis_test.py#L3. There must be something wrong with your environment, maybe that can be fixed in some other way?
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.
I found a better way to do this directly in our test runner, so i removed this
libs/template/templates/default/template/{{.project_name}}/tests/conftest.py
Show resolved
Hide resolved
libs/template/templates/default/template/{{.project_name}}/tests/conftest.py
Outdated
Show resolved
Hide resolved
…ts/conftest.py Co-authored-by: Lennart Kats (databricks) <lennart.kats@databricks.com>
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Changes
Why
This will make the example test compatible with the upcoming workspace unit testing feature.
Tests