From cbf4759884104096348efc74cc746a4d441ec079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Hovm=C3=B6ller?= Date: Sat, 26 Oct 2024 04:23:00 +0200 Subject: [PATCH] Fixed bug where mutmut would recollect all tests on every run --- mutmut/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mutmut/__main__.py b/mutmut/__main__.py index 211e7525..0662f6e2 100644 --- a/mutmut/__main__.py +++ b/mutmut/__main__.py @@ -674,7 +674,7 @@ def __init__(self, *, ids): def clear_out_obsolete_test_names(self): count_before = len(mutmut.tests_by_mangled_function_name) mutmut.tests_by_mangled_function_name = { - k: {test_name for test_name in test_names if test_name not in self.ids} + k: {test_name for test_name in test_names if test_name in self.ids} for k, test_names in mutmut.tests_by_mangled_function_name.items() } count_after = len(mutmut.tests_by_mangled_function_name)