Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Test runner reports success when no solutions are executed

未关闭 适合新手
#53 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@vivek-3728 已经在做这个了。

开始于 2026年10月20日。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
testing

调研方向

从 run.py 开始,这里由问题和语言筛选器选择解答,并通过最终退出状态检查是否存在失败。运行 issue 中的两个示例命令,复现空运行却成功退出的情况。更新处理逻辑,使其在选择结果为空时给出提示并以非零状态退出;验证匹配的解答仍能正常运行。

由索引模型根据 Issue 内容生成。

描述

bug good first 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 摘要。