%%foo and %foo magics are distinguishable to inspect
()
| 1638 | |
| 1639 | |
| 1640 | def test_line_cell_info(): |
| 1641 | """%%foo and %foo magics are distinguishable to inspect""" |
| 1642 | ip = get_ipython() |
| 1643 | ip.magics_manager.register(FooFoo) |
| 1644 | oinfo = ip.object_inspect("foo") |
| 1645 | assert oinfo["found"] is True |
| 1646 | assert oinfo["ismagic"] is True |
| 1647 | |
| 1648 | oinfo = ip.object_inspect("%%foo") |
| 1649 | assert oinfo["found"] is True |
| 1650 | assert oinfo["ismagic"] is True |
| 1651 | assert oinfo["docstring"] == FooFoo.cell_foo.__doc__ |
| 1652 | |
| 1653 | oinfo = ip.object_inspect("%foo") |
| 1654 | assert oinfo["found"] is True |
| 1655 | assert oinfo["ismagic"] is True |
| 1656 | assert oinfo["docstring"] == FooFoo.line_foo.__doc__ |
| 1657 | |
| 1658 | |
| 1659 | def test_multiple_magics(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…