Skip to content
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

Use pytest-datadir in generate_upf_data fixture? #440

Closed
greschd opened this issue Nov 13, 2019 · 2 comments
Closed

Use pytest-datadir in generate_upf_data fixture? #440

greschd opened this issue Nov 13, 2019 · 2 comments

Comments

@greschd
Copy link
Member

greschd commented Nov 13, 2019

The generate_upf_data fixture manually constructs the path to the UPF file. This means it fails if the test is run from anywhere other than the project root. Since we already implicitly (through pytest-regressions) depend on pytest-datadir, that could be fixed by using a shared_datadir.

@greschd
Copy link
Member Author

greschd commented Nov 13, 2019

After a bit more checking, it seems pytest-datadir always assumes the data directories to be in the same directory as the tests themselves, and can't be used in session scope. So that makes it unsuitable for this particular purpose, I believe.

@greschd greschd closed this as completed Nov 13, 2019
@greschd
Copy link
Member Author

greschd commented Nov 13, 2019

Related issue / feature suggestion in pytest-datadir: gabrielcnr/pytest-datadir#28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant