nvim-neotest / nvim-neotest/neotest-python
pytest-django and parallel testing issues with database
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 192
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the neotest pytest runner and how it invokes pytest-django tests, then compare that with pytest-xdist's documented parallel database behavior. Done means neotest-python can run tests with isolated worker databases instead of having all tests share one database.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- neovim, python
- Domain
- databases, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100