mutmut run bombs out during initial test run

オープン
#485 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python

調査の方向性

mutmut 3.5.0、示されている設定、および python -m pytest -vv -x -q --rootdir=. を使って失敗を再現し、通常の pytest test の実行結果と比較します。初回のテスト実行中にミュータントが有効になっているか、また ScanTriggerType のアサーション失敗がどのように報告されるかを追跡します。Done では、失敗している段階を説明し、ユーザーが利用できる診断情報を提供する必要があります。

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

説明

Using "mutmut run" with 3.5.0 and config:

[mutmut]
paths_to_mutate=src/my_project
mutate_only_covered_lines=false
debug = true

does the following:

....
⠙ Running stats     python -m pytest  -vv -x -q --rootdir=.
....
platform linux -- Python 3.10.19, pytest-9.0.2, pluggy-1.6.0
cachedir: .pytest_cache
rootdir: <redacted>/mutants
configfile: setup.cfg
testpaths: test
......
<lots of passed tests until one fails>
E           AssertionError: xǁScanTriggerTypeǁis_rescan_trigger__mutmut_mutants must be either event or rescan, not both or neither. is_event=False, is_rescan=False
E           assert (False ^ False)

Normal "pytest test" runs just fine, the test does NOT have a bug in it and passes normally without mutmut.

This is triggering an area where in one of our tests, we assert that a value is one of a few options... but somehow mutmut is changing this value, seeing the test fail, and then just stopping? ScanTriggerType is an enum.

It seems like it's applying mutants to the initial run of pytest that's supposed to just verify the tests work, or it's failing to catch asserts on tests once it's validating mutants?

The biggest issue here though is that the output doesn't tell me anything. As a first time user, I have no idea why this is failing, what stage it's in, no tips for what might be wrong, no debug output about what mutmut is doing from step to step, etc...

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

環境構築

はじめの一歩

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

boxed/mutmut のほかの issue

boxed/mutmut の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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