Test that the planter keeps the mutants of every folder mutmut runs in
CI / tests (pull_request) Successful in 3m49s
CI / tests (pull_request) Successful in 3m49s
This commit is contained in:
@@ -150,6 +150,13 @@ 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_keeps_the_mutants_of_every_folder_mutmut_runs_in(self):
|
||||
for path, text in (("tools/setup.cfg", "[tool:pytest]\n"), ("tools/pkg/calc.py", CALC)):
|
||||
(self.top / path).parent.mkdir(parents=True, exist_ok=True)
|
||||
(self.top / path).write_text(text)
|
||||
found = killed_mutants(str(self.top), ["tools/pkg/calc.py", "bin/pkg/calc.py"], self.mutmut(RESULTS.replace("calc.x_", "pkg.calc.x_")), 3)
|
||||
self.assertEqual([mutant.name for mutant in found], ["bin/pkg/calc.py:2 x_double__mutmut_1", "bin/pkg/calc.py:6 x_triple__mutmut_2", "tools/pkg/calc.py:2 x_double__mutmut_1", "tools/pkg/calc.py:6 x_triple__mutmut_2"])
|
||||
|
||||
def test_a_file_in_the_folder_mutmut_runs_in_at_the_top_keeps_its_path(self):
|
||||
(self.top / "setup.cfg").write_text("[tool:pytest]\n")
|
||||
(self.top / "calc.py").write_text(CALC)
|
||||
|
||||
Reference in New Issue
Block a user