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-django and parallel testing issues with database #90

Open
bendavis78 opened this issue Jan 7, 2025 · 0 comments
Open

pytest-django and parallel testing issues with database #90

bendavis78 opened this issue Jan 7, 2025 · 0 comments

Comments

@bendavis78
Copy link

bendavis78 commented Jan 7, 2025

I'm using the pytest runner, and am using pytest-django. I also have pytest-xdist installed, which allows me to pass -n to run tests in parallel:

$ /usr/local/bin/py.test -n 32 my_project/tests/

The -n param tells pytest-django to create separate databases for each test, each ending in _gw0, _gw1, etc. for each process.

However, when I run neotest with the pytest runner, all tests use the same database, which leads to conflicting states in tests.

Is there a way to run neotest-python tests such that each test uses its own database?

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