diff options
Diffstat (limited to 'tests/test_debug.py')
-rw-r--r-- | tests/test_debug.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test_debug.py b/tests/test_debug.py new file mode 100644 index 00000000..f3ae31fb --- /dev/null +++ b/tests/test_debug.py @@ -0,0 +1,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-', + ]) |