MCPcopy Create free account
hub / github.com/boxed/mutmut / load

Method load

src/mutmut/mutation/data.py:19–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

17 self.type_check_error_by_key: dict[str, str | None] = {}
18
19 def load(self) -> None:
20 try:
21 with open(self.meta_path) as f:
22 meta = json.load(f)
23 except FileNotFoundError:
24 return
25
26 self.exit_code_by_key = meta.pop("exit_code_by_key")
27 self.type_check_error_by_key = meta.pop("type_check_error_by_key", {})
28 self.durations_by_key = meta.pop("durations_by_key")
29 self.estimated_time_of_tests_by_mutant = meta.pop("estimated_durations_by_key")
30 assert not meta, f"Meta file {self.meta_path} constains unexpected keys: {set(meta.keys())}"
31
32 def register_pid(self, *, pid: int, key: str) -> None:
33 self.key_by_pid[pid] = key

Callers 10

create_mutants_for_fileFunction · 0.95
export_cicd_statsFunction · 0.95
resultsFunction · 0.95
find_mutantFunction · 0.95
read_dataMethod · 0.95
load_statsFunction · 0.80
read_json_fileFunction · 0.80
test_include_data_existsFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_include_data_existsFunction · 0.64