test various invalid values for float_precision.
()
| 134 | |
| 135 | |
| 136 | def test_bad_precision(): |
| 137 | """test various invalid values for float_precision.""" |
| 138 | f = PlainTextFormatter() |
| 139 | |
| 140 | def set_fp(p): |
| 141 | f.float_precision = p |
| 142 | |
| 143 | pytest.raises(ValueError, set_fp, "%") |
| 144 | pytest.raises(ValueError, set_fp, "%.3f%i") |
| 145 | pytest.raises(ValueError, set_fp, "foo") |
| 146 | pytest.raises(ValueError, set_fp, -1) |
| 147 | |
| 148 | |
| 149 | def test_for_type(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…