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

Aberta
#160 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
62/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
python, typescript
Domínio
ci-cd, testing

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
TypeScript
Estrelas
0
Forks
4
Merge médio
18h 41min
PRs com merge (30d)
48

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de DiffCI/core

Todas as issues de DiffCI/core

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.