pytest-dev / pytest-dev/pytest

deprecate automated initial conftest consideration and make conftest consideration triggered by a config option

Open
#6,912 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: backward compatibility type: deprecation
Dominant language
Python
Stars
14.5k
Forks
3.4k
Avg merge
2d 9h
Merged PRs (30d)
35

Description

follow-up to #6904

initial conftests and pytest_addoption in conftests is still rather confusing,

we should deprecate automatic scanning, and require people to list the initial conftests as a ini option

we can then warn for all non-initial conftests when hooks are implemented that are too late

additionally we can extend the unknown argument error to include a reference to the otption to set the conftests manually

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 with the related issue #6904 and trace the existing handling of initial conftests and pytest_addoption in conftests. Done should include an ini option for explicitly listing initial conftests, warnings for late hook implementations, and an unknown-argument error that references the configuration option.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.