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

Function test_run_cell

IPython/core/tests/test_iplib.py:215–238  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213
214
215def test_run_cell():
216 import textwrap
217 ip.run_cell('a = 10\na+=1')
218 ip.run_cell('assert a == 11\nassert 1')
219
220 nt.assert_equal(ip.user_ns['a'], 11)
221 complex = textwrap.dedent("""
222 if 1:
223 print "hello"
224 if 1:
225 print "world"
226
227 if 2:
228 print "foo"
229
230 if 3:
231 print "bar"
232
233 if 4:
234 print "bar"
235
236 """)
237 # Simply verifies that this kind of input is run
238 ip.run_cell(complex)
239
240
241def test_db():

Callers

nothing calls this directly

Calls 1

run_cellMethod · 0.45

Tested by

no test coverage detected