pytest 9: read `pytest.toml` and the native `[tool.pytest]` table

Aperta
#160 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
62/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, typescript
Ambito
ci-cd, testing

Direzione di ricerca

Start with src/git/git-diff.ts and the existing pytest configuration parsing and tests; the issue depends on #159, so read that first. Add fixtures and tests for pytest.toml, .pytest.toml, [tool.pytest], and precedence, checking how pytest handles both TOML tables. Update PROJECT_FILES and the Python entries in CONFIG_PATTERNS; run npm test and confirm configuration changes fall back with a named reason.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

adapter bug good first issue

Depends on #159.

pytest 9.0 added two ways to configure it. First, pytest.toml and the hidden .pytest.toml, which come before pytest.ini and match even when empty. Second, a native [tool.pytest] table in pyproject.toml that uses real TOML types. DiffCI reads neither. A pyproject.toml with [tool.pytest] and python_files = ["check_*.py"] gives the defaults today.

Done when:

  • pytest.toml and .pytest.toml are first in the search order. Their settings are under a [pytest] table.
  • [tool.pytest] in pyproject.toml is read like [tool.pytest.ini_options], after #158's list parsing. Take care that the [tool.pytest] pattern doesn't also match [tool.pytest.ini_options] or the reverse. Check what pytest does when both tables are present, and set unreadable if it's unclear.
  • pytest.toml and .pytest.toml are added to PROJECT_FILES and to the Python entries in CONFIG_PATTERNS (src/git/git-diff.ts). A change to either then falls back with a named reason, like pytest.ini.
  • There are tests for each file and the precedence between them.

New to DiffCI? See CONTRIBUTING.md: add a synthetic fixture, run npm test, and sign off commits with git commit -s. Comment here to claim the issue.

Lingua principale
TypeScript
Stelle
0
Fork
4
Merge medio
18h 41m
PR unite (30g)
48

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DiffCI/core

Tutte le issue di DiffCI/core

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.