Skip to content

Commit

Permalink
fix for src/ layout
Browse files Browse the repository at this point in the history
  • Loading branch information
15r10nk committed Oct 25, 2024
1 parent 8c3f981 commit dd4dc34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mutmut/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,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__.', '.'): None
'.'.join([module_name, x]).replace('.__init__.', '.').replace("src.",""): None
for x in mutant_names
}
source_file_mutation_data.hash_by_function_name = hash_by_function_name
Expand Down Expand Up @@ -1061,7 +1061,7 @@ def collect_source_file_mutation_data(*, mutant_names):
source_file_mutation_data_by_path[str(path)] = m

mutants = [
(m, mutant_name, result)
(m, mutant_name.replace("src.",""), result)
for path, m in source_file_mutation_data_by_path.items()
for mutant_name, result in m.exit_code_by_key.items()
]
Expand Down

0 comments on commit dd4dc34

Please sign in to comment.