test various invalid values for float_precision.
()
| 91 | nt.assert_equal(f(pi), repr(pi)) |
| 92 | |
| 93 | def test_bad_precision(): |
| 94 | """test various invalid values for float_precision.""" |
| 95 | f = PlainTextFormatter() |
| 96 | def set_fp(p): |
| 97 | f.float_precision=p |
| 98 | nt.assert_raises(ValueError, set_fp, '%') |
| 99 | nt.assert_raises(ValueError, set_fp, '%.3f%i') |
| 100 | nt.assert_raises(ValueError, set_fp, 'foo') |
| 101 | nt.assert_raises(ValueError, set_fp, -1) |
| 102 | |
| 103 | def test_for_type(): |
| 104 | f = PlainTextFormatter() |
nothing calls this directly
no test coverage detected