MCPcopy Create free account
hub / github.com/ipython/ipython / test_cell_magic_class2

Method test_cell_magic_class2

IPython/core/tests/test_magic.py:833–846  ·  view source on GitHub ↗

Cell magics declared via a class, #2

(self)

Source from the content-addressed store, hash-verified

831 self.check_ident('cellm3')
832
833 def test_cell_magic_class2(self):
834 "Cell magics declared via a class, #2"
835 @magics_class
836 class MyMagics2(Magics):
837
838 @cell_magic('cellm4')
839 def cellm33(self, line, cell):
840 return line, cell
841
842 _ip.register_magics(MyMagics2)
843 self.check_ident('cellm4')
844 # Check that nothing is registered as 'cellm33'
845 c33 = _ip.find_cell_magic('cellm33')
846 nt.assert_equal(c33, None)
847
848def test_file():
849 """Basic %%writefile"""

Callers

nothing calls this directly

Calls 2

check_identMethod · 0.95
find_cell_magicMethod · 0.80

Tested by

no test coverage detected