Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Add test to detect improper working dir. #171

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

ienkovich
Copy link
Contributor

With this test, we enforce pytest run from the root HDK directory. This is to state that we don't support pytest run from arbitrary places to easily locate resource files (like test CSV files) in python tests.

@kurapov-peter
Copy link
Contributor

Why force it at all?

@ienkovich
Copy link
Contributor Author

Why force it at all?

In C++ we use macroses to specify test files' location. For Python, we cannot do a similar thing through cmake. Working dir for tests depends on where tests were run from and it makes it hard to find data files (there is already a PR working with the taxi data sample). Fixing pytest run dir is the simplest solution. This test is to provide a user with a better description of the error rather than stating that some files are missing.

We are open to alternate solutions.

@kurapov-peter kurapov-peter merged commit 019e790 into main Feb 1, 2023
@kurapov-peter kurapov-peter deleted the ienkovich/force-pytest-dir branch February 1, 2023 14:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants