Conversation
lennartkats-db
left a comment
There was a problem hiding this comment.
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.
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.
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>
Head branch was pushed to by a user without write access
|
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