1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
"""Tests of coverage/debug.py"""
from coverage.debug import info_formatter
from tests.coveragetest import CoverageTest
class InfoFormatterTest(CoverageTest):
"""Tests of misc.info_formatter."""
def test_info_formatter(self):
lines = list(info_formatter([
('x', 'hello there'),
('very long label', ['one element']),
('regular', ['abc', 'def', 'ghi', 'jkl']),
('nothing', []),
]))
self.assertEqual(lines, [
' x: hello there',
'very long label: one element',
' regular: abc',
' def',
' ghi',
' jkl',
' nothing: -none-',
])
|