summaryrefslogtreecommitdiff
path: root/tests/test_debug.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-01-24 09:24:36 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-01-24 09:24:36 -0500
commitc1bfa7352368b63f3a9b30c02f242408d07a7ab2 (patch)
tree171578bc73148123b76ce8a936f5856493236dad /tests/test_debug.py
parent7b22a67863996bc00248645c69dd3f37ef1a8926 (diff)
downloadpython-coveragepy-git-c1bfa7352368b63f3a9b30c02f242408d07a7ab2.tar.gz
info_formatter shouldn't assume it gets a list
Diffstat (limited to 'tests/test_debug.py')
-rw-r--r--tests/test_debug.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_debug.py b/tests/test_debug.py
index 33bca442..8aad9257 100644
--- a/tests/test_debug.py
+++ b/tests/test_debug.py
@@ -31,6 +31,10 @@ class InfoFormatterTest(CoverageTest):
' nothing: -none-',
])
+ def test_info_formatter_with_generator(self):
+ lines = list(info_formatter(('info%d' % i, i) for i in range(3)))
+ self.assertEqual(lines, ['info0: 0', 'info1: 1', 'info2: 2'])
+
class DebugTraceTest(CoverageTest):
"""Tests of debug output."""