Skip to content

Commit 2dee62b

Browse files
committed
fix: mutant object subscriptable
1 parent 9cd18a3 commit 2dee62b

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

examples/go_webservice/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ mutahunter run --test-command "go test" --code-coverage-report-path "coverage.xm
2727
### Surviving Mutant Analysis
2828

2929
[Mutants](./mutants.json)
30-
[Report](./mutant_analysis.md)
30+
31+
[Report](./mutant_analysis.md)

examples/java_maven/readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ mutahunter gen --test-command "mvn test" --code-coverage-report-path "target/sit
2929
### Surviving Mutant Analysis
3030

3131
[Mutants](./mutants.json)
32-
[Report](./mutant_analysis.md)
32+
33+
[Report](./mutant_analysis.md)

examples/js_vanilla/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ mutahunter run --test-command "npm run test" --code-coverage-report-path "covera
1919
### Surviving Mutant Analysis
2020

2121
[Mutants](./mutants.json)
22-
[Report](./mutant_analysis.md)
22+
23+
[Report](./mutant_analysis.md)

examples/python_fastapi/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ mutahunter run --test-command "pytest" --code-coverage-report-path "coverage.xml
1919
### Surviving Mutant Analysis
2020

2121
[Mutants](./mutants.json)
22-
[Report](./mutant_analysis.md)
22+
23+
[Report](./mutant_analysis.md)
24+
∂∂∂

src/mutahunter/core/unittest_generator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def check_mutant_coverage_increase(self, generated_unittest, test_code):
258258
result = runner.run_test(
259259
{
260260
"module_path": self.config.source_file_path,
261-
"replacement_module_path": mutant["mutant_path"],
261+
"replacement_module_path": mutant.mutant_path,
262262
"test_command": self.config.test_command,
263263
}
264264
)
@@ -267,14 +267,14 @@ def check_mutant_coverage_increase(self, generated_unittest, test_code):
267267
self.weak_unittests.append(
268268
{
269269
"code": test_code,
270-
"survived_mutant_id": f"Mutant {mutant['id']} not killed",
270+
"survived_mutant_id": f"Mutant {mutant.id} not killed",
271271
}
272272
)
273273
else:
274274
print("Mutation coverage increased!")
275275
mutant.status = "KILLED"
276-
with open("logs/_latest/golden_tests.txt", "a") as f:
277-
f.write(test_code)
276+
# with open("logs/_latest/golden_tests.txt", "a") as f:
277+
# f.write(test_code)
278278
return True
279279
return False
280280

0 commit comments

Comments
 (0)