()
| 48 | """ |
| 49 | |
| 50 | def test_loop_colors(): |
| 51 | |
| 52 | for style in ('Linux', 'NoColor','LightBG', 'Neutral'): |
| 53 | |
| 54 | def test_unicode_colorize(): |
| 55 | p = Parser(style=style) |
| 56 | f1 = p.format('1/0', 'str') |
| 57 | f2 = p.format(u'1/0', 'str') |
| 58 | nt.assert_equal(f1, f2) |
| 59 | |
| 60 | def test_parse_sample(): |
| 61 | """and test writing to a buffer""" |
| 62 | buf = io.StringIO() |
| 63 | p = Parser(style=style) |
| 64 | p.format(sample, buf) |
| 65 | buf.seek(0) |
| 66 | f1 = buf.read() |
| 67 | |
| 68 | nt.assert_not_in('ERROR', f1) |
| 69 | |
| 70 | def test_parse_error(): |
| 71 | p = Parser(style=style) |
| 72 | f1 = p.format(')', 'str') |
| 73 | if style != 'NoColor': |
| 74 | nt.assert_in('ERROR', f1) |
| 75 | |
| 76 | yield test_unicode_colorize |
| 77 | yield test_parse_sample |
| 78 | yield test_parse_error |
nothing calls this directly
no outgoing calls
no test coverage detected