MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / check_text_lines

Function check_text_lines

tests/textcode/test_analysis.py:25–31  ·  view source on GitHub ↗
(result, expected_file, regen=REGEN_TEST_FIXTURES)

Source from the content-addressed store, hash-verified

23
24
25def check_text_lines(result, expected_file, regen=REGEN_TEST_FIXTURES):
26 if regen:
27 with open(expected_file, 'w') as tf:
28 json.dump(result, tf, indent=2)
29 with open(expected_file, 'rb') as tf:
30 expected = json.load(tf)
31 assert result == expected
32
33
34class TestAnalysis(FileBasedTesting):

Calls 2

dumpMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected