MCPcopy Index your code
hub / github.com/python/mypy / assert_module_equivalence

Function assert_module_equivalence

mypy/test/helpers.py:197–206  ·  view source on GitHub ↗
(name: str, expected: Iterable[str], actual: Iterable[str])

Source from the content-addressed store, hash-verified

195
196
197def assert_module_equivalence(name: str, expected: Iterable[str], actual: Iterable[str]) -> None:
198 expected_normalized = sorted(expected)
199 actual_normalized = sorted(set(actual).difference({"__main__"}))
200 assert_string_arrays_equal(
201 expected_normalized,
202 actual_normalized,
203 ('Actual modules ({}) do not match expected modules ({}) for "[{} ...]"').format(
204 ", ".join(actual_normalized), ", ".join(expected_normalized), name
205 ),
206 )
207
208
209def assert_target_equivalence(name: str, expected: list[str], actual: list[str]) -> None:

Callers 3

perform_stepMethod · 0.90
run_case_onceMethod · 0.90
run_case_stepMethod · 0.90

Calls 5

sortedFunction · 0.85
setClass · 0.85
formatMethod · 0.45
joinMethod · 0.45

Tested by 3

perform_stepMethod · 0.72
run_case_onceMethod · 0.72
run_case_stepMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…