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

pytest command should use pyargs instead of path based option #77

Open
ianmkenney opened this issue Jul 24, 2023 · 3 comments
Open

pytest command should use pyargs instead of path based option #77

ianmkenney opened this issue Jul 24, 2023 · 3 comments
Assignees

Comments

@ianmkenney
Copy link
Collaborator

For compiled projects, path-based pytests will fail. See the failed tests with mdaencore.

https://github.com/MDAnalysis/mdaencore/actions/runs/5648200654/job/15300027899#step:8:34

This is because the *.so files are not found. Using pyargs ensures that the proper package is imported.

pytest -n 2 -v --cov=mdaencore --cov-report=xml --color=yes --pyargs <PACKAGENAME>

Side note: should we replace -n 2 with -n auto?

@IAlibay
Copy link
Member

IAlibay commented Jul 24, 2023

I'm not sure why the *.so files wouldn't be found. using --pyargs has a lot of disadvantages (including not being able to use local extensions properly). I wouldn't advocate for it in nearly all cases.

@IAlibay
Copy link
Member

IAlibay commented Jul 24, 2023

should we replace -n 2 with -n auto?

I would second this.

@IAlibay
Copy link
Member

IAlibay commented Jul 24, 2023

I'm not sure why the *.so files wouldn't be found. using --pyargs has a lot of disadvantages (including not being able to use local extensions properly). I wouldn't advocate for it in nearly all cases.

To clarify here - plenty of projects don't use pyargs and have .so files. I think there's a deeper issue here that's being overlooked.

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

2 participants