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 seems to be failing in certain environments #935

Open
glass-ships opened this issue Jan 8, 2025 · 1 comment · May be fixed by #937
Open

Pytest seems to be failing in certain environments #935

glass-ships opened this issue Jan 8, 2025 · 1 comment · May be fixed by #937
Assignees

Comments

@glass-ships
Copy link
Collaborator

I've noticed some CI pipelines for test-backend passing, but locally as well as for other PR's (like #890 and #745) pytest is failing with something along the lines of:

ImportError: Error importing plugin "tests.fixtures.search_query": No module named 'tests'

Appears to be an issue with pytest trying to run/import conftest.py but I can't tell when this issue started or why it's complaining now (pytest version doesn't appear to have changed, and pinning to 8.2.0 doesn't fix the issue)

@kevinschaper
Copy link
Member

I finally recognized this from when it started happening for me locally, I think it's when the PYTHONPATH isn't set to include the root of the python part of the project (./backend). Over in #937 I tweaked the action to include setting PYTHONPATH, and then changed the pytest commands to not look into backend/tests but just direct to tests (I'm a little confused by that, except that it must be a package argument rather than a path argument?).

@kevinschaper kevinschaper self-assigned this Jan 9, 2025
@kevinschaper kevinschaper added this to the 2025-01 Release milestone Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants