MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / main

Function main

diffusers/utils/overwrite_expected_slice.py:67–81  ·  view source on GitHub ↗
(correct, fail=None)

Source from the content-addressed store, hash-verified

65
66
67def main(correct, fail=None):
68 if fail is not None:
69 with open(fail, "r") as f:
70 test_failures = {l.strip() for l in f.readlines()}
71 else:
72 test_failures = None
73
74 with open(correct, "r") as f:
75 correct_lines = f.readlines()
76
77 done_tests = defaultdict(int)
78 for line in correct_lines:
79 file, class_name, test_name, correct_line = line.split("::")
80 if test_failures is None or "::".join([file, class_name, test_name]) in test_failures:
81 overwrite_file(file, class_name, test_name, correct_line, done_tests)
82
83
84if __name__ == "__main__":

Callers 1

Calls 1

overwrite_fileFunction · 0.85

Tested by

no test coverage detected