Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`run` with a `name__mutmut_*` pattern runs the whole test suite in the clean-test check

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

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

@Ishaan400 がすでに取り組んでいます。

2026年10月9日 から。

  • #594 @Ishaan400 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
testing

調査の方向性

まず tests_for_mutant_names と、clean-test チェックがその結果を PytestRunner.run_tests に渡す方法を読んでください。提供された mutmut run のパターンと、関数のカバレッジ外にあり、実行されたかどうかを記録するテストを使って再現してください。clean-test チェックが無関係なそのテストを実行せず、意図したミュータントを引き続き選択するようになれば完了です。

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

説明

mutmut 3.7.0. mutmut run "pkg.mod.x_f__mutmut_*" selects exactly f's mutants,
but before testing them the "Running clean tests" step calls
tests_for_mutant_names, which, for a pattern containing *, fnmatches it
against the keys of tests_by_mangled_function_name. Those keys are function
names (pkg.mod.x_f), which a pattern ending in __mutmut_* never matches, so
the test set is empty and PytestRunner.run_tests(tests=set()) falls back to
the whole suite, single process.

Effect on a 19k-test suite: 607s of a 640s run (122 mutants; the mutants
themselves took 16s).

Repro: any project; mutmut run "<module>.x_<func>__mutmut_*" with a test
outside that function's coverage that records it ran: it runs during
"Running clean tests".

Suggested fix: in tests_for_mutant_names, for a pattern containing *,
also match mangled_name_from_mutant_name-style (strip __mutmut_ and what
follows) against the function keys, or match each function key k by
fnmatch(k + "__mutmut_1", pattern).

主要言語
Python
スター
1.5k
フォーク
179
平均マージ
1日 18時間
マージ済み PR(30日)
6

環境構築

はじめの一歩

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

boxed/mutmut のほかの issue

boxed/mutmut の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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