Answer stability round 1: 1 🔴, 0 🟡 (1 misread); mutated matches Gremlins' lines that keep their CR as well as mutmut's, and the last line of a mutant that ends the file takes no line end; the prose findings' rewording is in this commit
This commit is contained in:
@@ -163,7 +163,7 @@ class KilledMutantsTest(unittest.TestCase):
|
||||
killed_mutants(str(self.top), ["bin/pkg/ends.py"], self.mutmut(), 3)
|
||||
self.assertEqual(self.ran[0][0][4:], ["pkg.ends.x_first*", "pkg.ends.x_last*"])
|
||||
|
||||
def test_a_file_with_crlf_line_ends_gives_the_same_mutants_without_the_cr_and_applies_to_it(self):
|
||||
def test_a_crlf_file_gives_the_same_mutants_without_the_cr_and_they_apply_to_it(self):
|
||||
(self.top / "bin/pkg/calc.py").write_bytes(CALC.replace("\n", "\r\n").encode())
|
||||
found = killed_mutants(str(self.top), ["bin/pkg/calc.py"], self.mutmut(RESULTS.replace("calc.x_", "pkg.calc.x_")), 3)
|
||||
self.assertEqual([(mutant.line, mutant.was, mutant.now) for mutant in found], [(2, (b"\treturn n * 2",), (b"\treturn n / 2",)), (6, (b"\treturn (", b"\t\tn * 3", b"\t)"), (b"\treturn [", b"\t\tn * 3", b"\t]"))])
|
||||
|
||||
Reference in New Issue
Block a user