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

Class FooFoo

IPython/core/tests/test_magic.py:1014–1024  ·  view source on GitHub ↗

class with both %foo and %%foo magics

Source from the content-addressed store, hash-verified

1012
1013@magics_class
1014class FooFoo(Magics):
1015 """class with both %foo and %%foo magics"""
1016 @line_magic('foo')
1017 def line_foo(self, line):
1018 "I am line foo"
1019 pass
1020
1021 @cell_magic("foo")
1022 def cell_foo(self, line, cell):
1023 "I am cell foo, not line foo"
1024 pass
1025
1026def test_line_cell_info():
1027 """%%foo and %foo magics are distinguishable to inspect"""

Callers 1

test_multiple_magicsFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_multiple_magicsFunction · 0.68