Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

docs: document the contributor testing workflow

Aperta Adatta ai principianti
#438 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@harmehak0173 ci sta già lavorando.

Dal 7/10/2026.

  • #446 di @harmehak0173 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
documentation

Direzione di ricerca

Inizia individuando la documentazione per i contributori e i test pytest esistenti per humanize.clamp(), usando issue #429 come riferimento di esempio. Aggiungi una breve sezione che tratti l'individuazione dei test, le convenzioni del repository, i casi parametrizzati, i comandi per i test mirati e per l'intera suite, e la verifica delle regressioni; il lavoro è completato quando il flusso di lavoro è chiaro per chi contribuisce per la prima volta.

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

Descrizione

Problem

As a first-time contributor, I found it difficult to determine the
expected workflow for adding and verifying tests.

While working on #429, I had to figure out:

  • how to find the appropriate test file
  • how to follow the repository's existing pytest conventions
  • how to run focused tests
  • how to run the full test suite
  • how to verify that a regression test actually fails when the
    protected behavior is broken

The current contributor documentation does not explain this workflow
for someone making their first test contribution.

Proposed change

Add a short contributor-testing section explaining how to:

  1. Find the relevant existing test file.
  2. Follow the repository's existing test patterns.
  3. Add parameterized test cases where appropriate.
  4. Run the relevant tests locally.
  5. Intentionally verify that the test catches a regression.
  6. Run the full test suite before opening a PR.

The section would use a small example based on the existing test suite.

Motivation

I encountered this while working on #429, where I added parameterized
tests for two-sided humanize.clamp() boundary behavior.

I also intentionally introduced a regression to verify that the new
test failed, then restored the implementation and ran the full suite.

Related PR: #429

Lingua principale
Python
Stelle
761
Fork
185
Merge medio
1h 42m
PR unite (30g)
5

Preparare l'ambiente

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 python-humanize/humanize

Tutte le issue di python-humanize/humanize

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.