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

Function test_timeit_shlex

IPython/core/tests/test_magic.py:644–652  ·  view source on GitHub ↗

test shlex issues with timeit (#1109)

()

Source from the content-addressed store, hash-verified

642 _ip.run_cell("π = 3.14;\nπ.is_integ*?")
643
644def test_timeit_shlex():
645 """test shlex issues with timeit (#1109)"""
646 _ip.ex("def f(*a,**kw): pass")
647 _ip.magic('timeit -n1 "this is a bug".count(" ")')
648 _ip.magic('timeit -r1 -n1 f(" ", 1)')
649 _ip.magic('timeit -r1 -n1 f(" ", 1, " ", 2, " ")')
650 _ip.magic('timeit -r1 -n1 ("a " + "b")')
651 _ip.magic('timeit -r1 -n1 f("a " + "b")')
652 _ip.magic('timeit -r1 -n1 f("a " + "b ")')
653
654
655def test_timeit_special_syntax():

Callers

nothing calls this directly

Calls 2

exMethod · 0.80
magicMethod · 0.45

Tested by

no test coverage detected