pytest-dev / pytest-dev/pytest-django

Testing with concurrency don't clone database

Open
#908 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
367
PR merge metrics
No merged PRs in 30d

Description

Django setup_databases has a parallel arg to avoid running migrations for each parallel runner.

Migrations are really slow and it was critical to our migration to pytest-django. I had to run it with --nomigrations, which is not what I wanted.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue points to Django's setup_databases parallel argument; start by tracing pytest-django's database setup path and its concurrency tests. Done means parallel runs avoid repeating migrations while still creating the databases needed by each runner; add or update tests for that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend, databases, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.