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

Function test_lines

tests/commoncode/test_text.py:16–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15
16def test_lines():
17 t = """This problem is.
18It is therefore
19
20
21 However,we
22without introducing ..
23 However, I have
24
25
26"""
27 assert len([p[1] for p in text.lines(t)]) == 5
28 expected = [
29 "This problem is.",
30 "It is therefore",
31 "However,we",
32 "without introducing ..",
33 "However, I have",
34 ]
35 assert [p for p in text.lines(t)] == expected
36
37
38def test_foldcase():

Callers

nothing calls this directly

Calls 1

linesMethod · 0.80

Tested by

no test coverage detected