Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

docs: document the contributor testing workflow

未關閉 適合新手
#438 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@harmehak0173 已經在處理了。

開始於 2026年10月7日。

  • #446 來自 @harmehak0173 —— 未關閉

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
78/100
Issue 類型
文件
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
python
領域
documentation

研究方向

首先定位貢獻者文件以及針對 humanize.clamp() 的現有 pytest 測試,並以 issue #429 作為範例參考。新增一個簡短的章節,涵蓋測試探索、儲存庫慣例、參數化案例、針對性測試與完整測試套件的指令,以及回歸驗證;當首次貢獻者能清楚理解這個工作流程時,即視為完成。

由索引模型根據 Issue 內容生成。

描述

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

主要語言
Python
星號
761
分支
185
平均合併
1 小時 42 分鐘
30 天內合併 PR
5

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

python-humanize/humanize 的其他 Issue

查看 python-humanize/humanize 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。