Python tests: `*_tests.py` (mkdocs/tests/*_tests.py, discovered with `unittest discover -p "*tests.py"`) is not a test file pattern

オープン 初心者向け
#255 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
tooling

調査の方向性

ファイルパターンは ecosystems/python/init.py の289〜292行目付近にある PYTHON_TEST_FILES にあります。まず正規表現と TestFiles の使用箇所を読んでください。*_tests.py ファイルと tests/ ディレクトリ配下のファイルが認識されるように拡張してください。再現例として unittest.TestCase を含む pkg/tests/build_tests.py を使います。そのファイルが検出され、既存の test_*.py と *_test.py のケースが引き続きマッチすれば完了です。

索引モデルが issue の本文から書いたものです。

説明

mkdocs: FAIL "no tests found (test_*.py or *_test.py files)" for 12 mkdocs/tests/*_tests.py files in a tests/ directory. When unittest discover -p names a pattern, use it; *_tests.py under tests/ is common anyway.

Evidence from the corpus audit

mkdocs/mkdocs / tests-run (test file pattern)
  • kind: FALSE_NEGATIVE
  • actual: FAIL "Python: no tests found (test_*.py or *_test.py files)".
  • expected: tests found: mkdocs/tests/*_tests.py (12 files in a tests/ directory), discovered by CI with
    unittest discover -p "*tests.py".
  • evidence: ls mkdocs/tests → build_tests.py, cli_tests.py, config/, gh_deploy_tests.py, ...;
    pyproject.toml:122: test = 'python -m unittest discover -s mkdocs -p "*tests.py"'. Validator:
    ecosystems/python/__init__.py:289-292: PYTHON_TEST_FILES = TestFiles(... path=re.compile(r"(?:^|/)(?:test_[^/]*| [^/]*_test)\.py$")) — _tests.py (plural) and files under a tests/ directory do not match.
  • repro: pkg/tests/build_tests.py containing unittest.TestCase.
  • confidence: medium (unusual naming, but the tests/ directory is unambiguous and the discover pattern is readable)

Found by the regression-corpus audit (235 real repositories, one or more per ecosystem profile; corpus and expected results in corpus/). Evidence is quoted from the audited checkouts at the commits pinned in corpus/projects.toml; <checkouts>/<owner>__<repo> is such a checkout.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt

主要言語
Python
スター
4
フォーク
1
平均マージ
10時間 41分
マージ済み PR(30日)
79

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cpp-best-practices/project_validator のほかの issue

cpp-best-practices/project_validator の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。