pytest.ini wins even when it's empty, and `.pytest.ini` is never read
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 84/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python, typescript
- Ambito
- developer-experience, testing
Direzione di ricerca
Inizia leggendo readPytestSettings e PROJECT_FILES, poi cerca i test con fixture sintetici descritti in CONTRIBUTING.md. Aggiungi un fixture in cui un pytest.ini vuoto ha la precedenza su pyproject.toml e un altro in cui .pytest.ini configura python_files; esegui npm test. Il lavoro è concluso quando entrambi i casi passano e .pytest.ini da solo viene rilevato come progetto Python.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
pytest's rule: pytest.ini "will always match and take precedence … even if empty", and it matches even without a [pytest] section. The hidden .pytest.ini works the same way. Only pyproject.toml, tox.ini and setup.cfg need their section to match. The first match wins, and options are never merged.
readPytestSettings skips any file without the section (if (!section) continue;) and never looks at .pytest.ini. So:
- With a
pytest.inithat has only a comment, plus apyproject.tomlthat setspython_files = ["check_*.py"], DiffCI usescheck_*.py. pytest uses its defaults,test_*.pyand*_test.py. DiffCI then doesn't seetest_x.pyas a test. - With only a
.pytest.inithat setspython_files = check_*.py, DiffCI uses the defaults and doesn't seecheck_x.pyas a test.
Done when:
- The search order is
pytest.ini,.pytest.ini, thenpyproject.toml,tox.iniandsetup.cfg. - An existing
pytest.inior.pytest.inistops the search, even without a[pytest]section. pytest's defaults apply when it has no section. .pytest.iniis added toPROJECT_FILES, so a repository whose only pytest file is.pytest.iniis detected as a Python project.- There is a test for each of the two cases above.
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
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DiffCI/core
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Planner: splitParts regex is quadratic on a quote followed by many backticks, so the fuzz test fails at randomForse già presa @FredApps l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Agent tools: changed_files lists only the new path of a renamed fileForse già presa @FredApps l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
DiffCI/core#243 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
adapter good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
agent-ready area: ui-server priority: p3 type: test
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
schlessera/brain-kit#4249 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation tool triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
can1357/oh-my-pi#19608 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
dependencies tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bcgov/nr-waste-plus#1549 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
blixvip/solana-token-meta#17 ·
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
blixvip/solana-tx-parse#18 ·