From 70818633d97eabd24bfde567a61a684f044ed54d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 24 Jan 2015 09:24:36 -0500 Subject: info_formatter shouldn't assume it gets a list --- tests/test_debug.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/test_debug.py') diff --git a/tests/test_debug.py b/tests/test_debug.py index 33bca44..8aad925 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.""" -- cgit v1.2.1