MCPcopy
hub / github.com/psf/black / test_line_ranges_line_by_line

Function test_line_ranges_line_by_line

tests/test_format.py:59–73  ·  view source on GitHub ↗
(filename: str)

Source from the content-addressed store, hash-verified

57
58@pytest.mark.parametrize("filename", all_data_cases("line_ranges_formatted"))
59def test_line_ranges_line_by_line(filename: str) -> None:
60 args, source, expected = read_data_with_mode("line_ranges_formatted", filename)
61 assert (
62 source == expected
63 ), "Test cases in line_ranges_formatted must already be formatted."
64 line_count = len(source.splitlines())
65 for line in range(1, line_count + 1):
66 assert_format(
67 source,
68 expected,
69 args.mode,
70 fast=args.fast,
71 minimum_version=args.minimum_version,
72 lines=[(line, line)],
73 )
74
75
76# =============== #

Callers

nothing calls this directly

Calls 2

read_data_with_modeFunction · 0.90
assert_formatFunction · 0.90

Tested by

no test coverage detected