Answer stability round 1: 0 🔴, 3 🟡 (0 misread); mutmut's copy keeps a link to a folder, the README place waits for item 300, and CRLF files are item 530
This commit is contained in:
@@ -33,11 +33,11 @@ def x_triple__mutmut_2(n):
|
||||
]
|
||||
"""
|
||||
RESULTS = " calc.x_double__mutmut_1: killed\n calc.x_double__mutmut_2: survived\n calc.x_triple__mutmut_1: no tests\n calc.x_triple__mutmut_2: caught by type check\n"
|
||||
# pytest 9.2.0's report of four failed tests, the last on an error the code raised.
|
||||
# pytest 9.2.0's report of three failed tests, the last on an error the code raised.
|
||||
PYTEST_FAILURES = """============================= test session starts ==============================
|
||||
collected 5 items
|
||||
|
||||
test_calc.py .FFFF [100%]
|
||||
test_calc.py ..FFF [100%]
|
||||
|
||||
=================================== FAILURES ===================================
|
||||
_____________________________ TotalTest.test_adds ______________________________
|
||||
@@ -128,6 +128,19 @@ class KilledMutantsTest(unittest.TestCase):
|
||||
self.assertEqual(self.ran[1][0], ["mutmut", "results", "--all", "true"])
|
||||
self.assertEqual(sorted(path.name for path in self.top.iterdir()), ["README.md", "bin"])
|
||||
|
||||
def test_mutmuts_copy_keeps_a_link_to_a_folder_as_a_link(self):
|
||||
(self.top / "bin/shared").mkdir()
|
||||
(self.top / "bin/pkg/fixtures").symlink_to("../shared")
|
||||
links: list[str] = []
|
||||
mutmut = self.mutmut()
|
||||
|
||||
def run(argv: list[str], cwd: str) -> Ran:
|
||||
links.extend(str(path.relative_to(cwd)) for path in pathlib.Path(cwd).rglob("*") if path.is_symlink())
|
||||
return mutmut(argv, cwd)
|
||||
|
||||
killed_mutants(str(self.top), ["bin/pkg/calc.py"], run, 3)
|
||||
self.assertEqual(links[:1], ["pkg/fixtures"])
|
||||
|
||||
def test_a_file_without_a_function_has_no_mutant_and_mutmut_does_not_run(self):
|
||||
self.assertEqual(killed_mutants(str(self.top), ["bin/pkg/empty.py"], self.mutmut(), 3), [])
|
||||
self.assertEqual(self.ran, [])
|
||||
|
||||
Reference in New Issue
Block a user