doctest for %precision In [1]: f = get_ipython().display_formatter.formatters['text/plain'] In [2]: %precision 5 Out[2]: '%.5f' In [3]: f.float_format Out[3]: '%.5f' In [4]: %precision %e Out[4]: '%e' In [5]: f(3.1415927) Out[5]: '3.141593
()
| 606 | _ip.magic("whos") |
| 607 | |
| 608 | def doctest_precision(): |
| 609 | """doctest for %precision |
| 610 | |
| 611 | In [1]: f = get_ipython().display_formatter.formatters['text/plain'] |
| 612 | |
| 613 | In [2]: %precision 5 |
| 614 | Out[2]: '%.5f' |
| 615 | |
| 616 | In [3]: f.float_format |
| 617 | Out[3]: '%.5f' |
| 618 | |
| 619 | In [4]: %precision %e |
| 620 | Out[4]: '%e' |
| 621 | |
| 622 | In [5]: f(3.1415927) |
| 623 | Out[5]: '3.141593e+00' |
| 624 | """ |
| 625 | |
| 626 | def test_debug_magic(): |
| 627 | """Test debugging a small code with %debug |
nothing calls this directly
no outgoing calls
no test coverage detected