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

Test runner reports success when no solutions are executed

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

維護者通常 1 天內回覆

@vivek-3728 已經在處理了。

開始於 2026年10月19日。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
76/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
python
領域
testing

研究方向

從 run.py 開始,這裡由問題和語言篩選器選擇解答,並透過最終結束狀態檢查是否有失敗。執行 issue 中的兩個範例命令,重現空執行卻成功結束的情況。更新處理方式,讓空選擇會被回報,並以非零狀態結束;確認符合條件的解答仍可正常執行。

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

描述

I noticed that the test runner reports a successful result even when the requested problem or language doesn't match any solutions.

For example, I tested:

python run.py does-not-exist
python run.py prime --lang rs

Both commands produced:

Summary: 0 passed, 0 failed, 0 skipped

The exit code was 0 in both cases. I repeated the tests twice and got the same results.

I expected the runner to report that no matching solutions were found and exit with a nonzero status, rather than treating an empty test run as successful.

Looking through run.py, the problem and language filters can exclude every available solution. However, the final exit status only checks whether any tests failed.

When nothing runs, the failure counter remains zero, so the runner reports success.

This could cause problems in automated verification. For example, a typo in a CI command or an incorrect language selection could skip every test while the pipeline still appears green.

A successful verification run should confirm that at least one matching solution was actually checked. If the selection is empty, the runner should report that explicitly instead of returning success.

主要語言
Python
星號
1
分支
6
平均合併
22 小時 23 分鐘
30 天內合併 PR
22

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 有 Pull Request 範本
  • 沒有貢獻指南

從這裡開始

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

techcsispit/code-corner 的其他 Issue

查看 techcsispit/code-corner 的全部 Issue

相似的 Issue

更多 Python Issue

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

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