diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2013-09-08 14:49:35 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2013-09-08 14:49:35 -0400 |
commit | 83411f84debeefa313a1b61121ef4fc9c9607fd6 (patch) | |
tree | e2e74a89ff3ae8ed330a3f33c96fc645700848bf /tests/test_debug.py | |
parent | 7540342d61b42d689cf824f8f4dfd674c474f909 (diff) | |
download | python-coveragepy-83411f84debeefa313a1b61121ef4fc9c9607fd6.tar.gz |
More --debug options, split code into separate objects.
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 0000000..f3ae31f --- /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-', + ]) |