From 1465724fc0b1691536eac8c5e40eb055a6ac64bc Mon Sep 17 00:00:00 2001 From: Frank Hoffmann <15r10nk-git@polarbit.de> Date: Fri, 25 Oct 2024 12:05:49 +0200 Subject: [PATCH] reverted some src. fixes --- mutmut/__main__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mutmut/__main__.py b/mutmut/__main__.py index 71fadb7b..542bc6a0 100644 --- a/mutmut/__main__.py +++ b/mutmut/__main__.py @@ -268,7 +268,7 @@ def create_mutants_for_file(filename, output_path): source_file_mutation_data = SourceFileMutationData(path=filename) module_name = str(filename)[:-len(filename.suffix)].replace(os.sep, '.') source_file_mutation_data.exit_code_by_key = { - '.'.join([module_name, x]).replace('.__init__.', '.').replace("src.",""): None + '.'.join([module_name, x]).replace('.__init__.', '.'): None for x in mutant_names } source_file_mutation_data.hash_by_function_name = hash_by_function_name @@ -1067,7 +1067,7 @@ def collect_source_file_mutation_data(*, mutant_names): source_file_mutation_data_by_path[str(path)] = m mutants = [ - (m, mutant_name.replace("src.",""), result) + (m, mutant_name, result) for path, m in source_file_mutation_data_by_path.items() for mutant_name, result in m.exit_code_by_key.items() ] @@ -1214,7 +1214,6 @@ def read_one_child_exit_status(): print_stats(source_file_mutation_data_by_path) mutant_name = mutant_name.replace('__init__.', '') - mutant_name = mutant_name.replace('src.', '') # Rerun mutant if it's explicitly mentioned, but otherwise let the result stand if not mutant_names and result is not None: