MCPcopy Index your code
hub / github.com/ipython/ipython / test_bad_precision

Function test_bad_precision

tests/test_formatters.py:136–146  ·  view source on GitHub ↗

test various invalid values for float_precision.

()

Source from the content-addressed store, hash-verified

134
135
136def 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
149def test_for_type():

Callers

nothing calls this directly

Calls 1

PlainTextFormatterClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…