| Module | Mutants | Found | Not Found | Timeout | Error | Score | ||
|---|---|---|---|---|---|---|---|---|
| src\poodle\util.py | Source | Mutants | 93 | 91 | 2 | 0 | 0 | 97.85% |
| src\poodle\mutators\unary_op.py | Source | 9 | 9 | 0 | 0 | 0 | 100.00% | |
| src\poodle\mutate.py | Source | Mutants | 111 | 109 | 2 | 0 | 0 | 98.20% |
| src\poodle\mutators\constant.py | Source | 73 | 73 | 0 | 0 | 0 | 100.00% | |
| src\poodle\core.py | Source | Mutants | 43 | 42 | 1 | 0 | 0 | 97.67% |
| src\poodle\mutators\calls.py | Source | 45 | 45 | 0 | 0 | 0 | 100.00% | |
| src\poodle\runners\command_line.py | Source | 68 | 68 | 0 | 0 | 0 | 100.00% | |
| src\poodle\report.py | Source | 10 | 10 | 0 | 0 | 0 | 100.00% | |
| src\poodle\data_types\work.py | Source | 22 | 22 | 0 | 0 | 0 | 100.00% | |
| src\poodle\mutators\operators.py | Source | 36 | 36 | 0 | 0 | 0 | 100.00% | |
| src\poodle\config.py | Source | Mutants | 324 | 322 | 2 | 0 | 0 | 99.38% |
| src\poodle\reporters\html.py | Source | Mutants | 152 | 151 | 1 | 0 | 0 | 99.34% |
| src\poodle\data_types\data.py | Source | Mutants | 173 | 166 | 7 | 0 | 0 | 95.95% |
| src\poodle\reporters\basic.py | Source | Mutants | 86 | 82 | 4 | 0 | 0 | 95.35% |
| src\poodle\data_types\interfaces.py | Source | 50 | 50 | 0 | 0 | 0 | 100.00% | |
| src\poodle\mutators\compare.py | Source | 30 | 30 | 0 | 0 | 0 | 100.00% | |
| Total | 1325 | 1306 | 19 | 0 | 0 | 98.57% |
Mutants
src\poodle\util.py
Status: Mutant Not Found
Mutator Name: Keyword
Unified Diff:
--- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:108
@@ -105,7 +105,7 @@
def create_unified_diff(mutant: Mutant) -> str | None:
"""Add unified diff to mutant."""
if mutant.source_file:
- file_lines = mutant.source_file.read_text("utf-8").splitlines(keepends=True)
+ file_lines = mutant.source_file.read_text("utf-8").splitlines(keepends=False)
file_name = str(mutant.source_file)
return "".join(
difflib.unified_diff(
Status: Mutant Not Found
Mutator Name: String
Unified Diff:
--- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:108
@@ -105,7 +105,7 @@
def create_unified_diff(mutant: Mutant) -> str | None:
"""Add unified diff to mutant."""
if mutant.source_file:
- file_lines = mutant.source_file.read_text("utf-8").splitlines(keepends=True)
+ file_lines = mutant.source_file.read_text('XXutf-8XX').splitlines(keepends=True)
file_name = str(mutant.source_file)
return "".join(
difflib.unified_diff(
src\poodle\mutate.py
Status: Mutant Not Found
Mutator Name: Number
Unified Diff:
--- src\poodle\mutate.py
+++ [Mutant] src\poodle\mutate.py:186
@@ -183,7 +183,7 @@
add_line_filter(line_filters, lineno, "all")
no_mut_filter: list[str] = re.findall(r"#\s*nomut:?\s*([A-Za-z0-9,\s]*)[#$]*", line)
- if no_mut_filter and no_mut_filter[0].strip().lower() in ("start", "on"):
+ if no_mut_filter and no_mut_filter[-1].strip().lower() in ("start", "on"):
no_mut_on = True
if no_mut_on:
Status: Mutant Not Found
Mutator Name: Number
Unified Diff:
--- src\poodle\mutate.py
+++ [Mutant] src\poodle\mutate.py:196
@@ -193,7 +193,7 @@
for mutator in mutators.split(","):
add_line_filter(line_filters, lineno, mutator.strip())
- if no_mut_filter and no_mut_filter[0].strip().lower() in ("end", "off"):
+ if no_mut_filter and no_mut_filter[-1].strip().lower() in ("end", "off"):
no_mut_on = False
return line_filters
src\poodle\core.py
Status: Mutant Not Found
Mutator Name: FuncCall
Unified Diff:
--- src\poodle\core.py
+++ [Mutant] src\poodle\core.py:45
@@ -42,7 +42,7 @@
results = run_mutant_trails(work, mutants, timeout)
for trial in results.mutant_trials:
- trial.mutant.unified_diff = create_unified_diff(trial.mutant)
+ trial.mutant.unified_diff = None
for reporter in work.reporters:
reporter(config=config, echo=work.echo, testing_results=results)
src\poodle\config.py
Status: Mutant Not Found
Mutator Name: FuncCall
Unified Diff:
--- src\poodle\config.py
+++ [Mutant] src\poodle\config.py:196
@@ -193,7 +193,7 @@
raise PoodleInputError(msg)
-def get_project_info(config_file: Path | None) -> tuple(str | None, str | None):
+def get_project_info(config_file: Path | None) -> None:
"""Retrieve Poodle configuration from specified Config File."""
if not config_file:
return (None, None)
Status: Mutant Not Found
Mutator Name: FuncCall
Unified Diff:
--- src\poodle\config.py
+++ [Mutant] src\poodle\config.py:218
@@ -215,7 +215,7 @@
return config_data.get("poodle", {})
-def get_project_info_toml(config_file: Path) -> tuple(str | None, str | None):
+def get_project_info_toml(config_file: Path) -> None:
"""Retrieve Project Name and Version from a 'toml' Config File."""
config_data = tomllib.load(config_file.open(mode="rb"))
config_data: dict = config_data.get("project", config_data)
src\poodle\reporters\html.py
Status: Mutant Not Found
Mutator Name: String
Unified Diff:
--- src\poodle\reporters\html.py
+++ [Mutant] src\poodle\reporters\html.py:22
@@ -19,7 +19,7 @@
def template_path() -> Path:
"""Return the path to the HTML Template folder."""
- return Path(__file__).parent.parent / "templates"
+ return Path(__file__).parent.parent / 'XXtemplatesXX'
STATIC_FILES = [
src\poodle\data_types\data.py
Status: Mutant Not Found
Mutator Name: Keyword
Unified Diff:
--- src\poodle\data_types\data.py
+++ [Mutant] src\poodle\data_types\data.py:83
@@ -80,7 +80,7 @@
source_folder: Path
source_file: Path | None
- unified_diff: str | None = None
+ unified_diff: str | None = ' '
@staticmethod
def from_dict(d: dict[str, Any]) -> dict[str, Any]:
Status: Mutant Not Found
Mutator Name: Compare
Unified Diff:
--- src\poodle\data_types\data.py
+++ [Mutant] src\poodle\data_types\data.py:90
@@ -87,7 +87,7 @@
"""Correct fields in Dictionary for JSON deserialization."""
if "source_folder" in d:
d["source_folder"] = Path(d["source_folder"])
- if "source_file" in d and d["source_folder"] is not None:
+ if 'source_file' in d or d['source_folder'] is not None:
d["source_file"] = Path(d["source_file"])
return d
Status: Mutant Not Found
Mutator Name: Keyword
Unified Diff:
--- src\poodle\data_types\data.py
+++ [Mutant] src\poodle\data_types\data.py:90
@@ -87,7 +87,7 @@
"""Correct fields in Dictionary for JSON deserialization."""
if "source_folder" in d:
d["source_folder"] = Path(d["source_folder"])
- if "source_file" in d and d["source_folder"] is not None:
+ if "source_file" in d and d["source_folder"] is not ' ':
d["source_file"] = Path(d["source_file"])
return d
Status: Mutant Not Found
Mutator Name: Number
Unified Diff:
--- src\poodle\data_types\data.py
+++ [Mutant] src\poodle\data_types\data.py:157
@@ -154,7 +154,7 @@
@property
def success_rate(self) -> float:
"""Return the success rate of the test run."""
- if self.trials > 0:
+ if self.trials > 1:
return self.found / self.trials
if self.tested > 0:
return self.found / self.tested
Status: Mutant Not Found
Mutator Name: Number
Unified Diff:
--- src\poodle\data_types\data.py
+++ [Mutant] src\poodle\data_types\data.py:159
@@ -156,7 +156,7 @@
"""Return the success rate of the test run."""
if self.trials > 0:
return self.found / self.trials
- if self.tested > 0:
+ if self.tested > 1:
return self.found / self.tested
return 0.0
Status: Mutant Not Found
Mutator Name: Keyword
Unified Diff:
--- src\poodle\data_types\data.py
+++ [Mutant] src\poodle\data_types\data.py:186
@@ -183,7 +183,7 @@
@staticmethod
def from_dict(d: dict[str, Any]) -> dict[str, Any]:
"""Correct fields in Dictionary for JSON deserialization."""
- d.pop("success_rate", None)
+ d.pop("success_rate", ' ')
d.pop("coverage_display", None)
return d
Status: Mutant Not Found
Mutator Name: Keyword
Unified Diff:
--- src\poodle\data_types\data.py
+++ [Mutant] src\poodle\data_types\data.py:187
@@ -184,7 +184,7 @@
def from_dict(d: dict[str, Any]) -> dict[str, Any]:
"""Correct fields in Dictionary for JSON deserialization."""
d.pop("success_rate", None)
- d.pop("coverage_display", None)
+ d.pop("coverage_display", ' ')
return d
def to_dict(self) -> dict[str, Any]:
src\poodle\reporters\basic.py
Status: Mutant Not Found
Mutator Name: Compare
Unified Diff:
--- src\poodle\reporters\basic.py
+++ [Mutant] src\poodle\reporters\basic.py:26
@@ -23,7 +23,7 @@
"""Echo quick summary to console."""
echo("")
summary = testing_results.summary
- if summary.trials < 1:
+ if summary.trials <= 1:
echo("!!! No mutants found to test !!!", fg="yellow")
return
Status: Mutant Not Found
Mutator Name: Number
Unified Diff:
--- src\poodle\reporters\basic.py
+++ [Mutant] src\poodle\reporters\basic.py:26
@@ -23,7 +23,7 @@
"""Echo quick summary to console."""
echo("")
summary = testing_results.summary
- if summary.trials < 1:
+ if summary.trials < 2:
echo("!!! No mutants found to test !!!", fg="yellow")
return
Status: Mutant Not Found
Mutator Name: Compare
Unified Diff:
--- src\poodle\reporters\basic.py
+++ [Mutant] src\poodle\reporters\basic.py:49
@@ -46,7 +46,7 @@
failed_trials.sort(
key=lambda trial: (
trial.mutant.source_folder,
- str(trial.mutant.source_file) or "",
+ str(trial.mutant.source_file) and '',
trial.mutant.lineno,
trial.mutant.mutator_name,
)
Status: Mutant Not Found
Mutator Name: String
Unified Diff:
--- src\poodle\reporters\basic.py
+++ [Mutant] src\poodle\reporters\basic.py:49
@@ -46,7 +46,7 @@
failed_trials.sort(
key=lambda trial: (
trial.mutant.source_folder,
- str(trial.mutant.source_file) or "",
+ str(trial.mutant.source_file) or 'XXXX',
trial.mutant.lineno,
trial.mutant.mutator_name,
)