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

Function test_find_assign_op_dedent

IPython/core/tests/test_inputtransformer2.py:245–254  ·  view source on GitHub ↗

be careful that empty token like dedent are not counted as parens

()

Source from the content-addressed store, hash-verified

243 nt.assert_equal(tf.transform(HELP_UNICODE[0]), HELP_UNICODE[2])
244
245def test_find_assign_op_dedent():
246 """
247 be careful that empty token like dedent are not counted as parens
248 """
249 class Tk:
250 def __init__(self, s):
251 self.string = s
252
253 nt.assert_equal(_find_assign_op([Tk(s) for s in ('','a','=','b')]), 2)
254 nt.assert_equal(_find_assign_op([Tk(s) for s in ('','(', 'a','=','b', ')', '=' ,'5')]), 6)
255
256def test_check_complete():
257 cc = ipt2.TransformerManager().check_complete

Callers

nothing calls this directly

Calls 2

_find_assign_opFunction · 0.90
TkClass · 0.85

Tested by

no test coverage detected