pytest-dev / pytest-dev/pytest-django

Create a management command to set up a sane pytest configuration

Open
#897 2 comments 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

I propose we add a management command, maybe something like python manage.py setup_pytest which will create a sane pytest.ini with some default settings. I intend the generated file to look something like this.

The file itself will be generated using the iniconfig package which pytest already depends on. Looks like iniconfig is not capable of writing files, in which case, I will just generate the file using inbuilt strings.

Finally, relevant documentation will also need to be written.

I would make a PR to do all this, when (and if) this is accepted.

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

Start by reviewing Django's custom management command guidance and the proposed setup_pytest entry point. Compare the linked pytest.ini example with the defaults the command should generate, then determine where relevant documentation belongs. Done means the command creates a usable pytest.ini and the behavior is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
cli, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.