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

Function test_side_effects_I

IPython/core/tests/test_inputtransformer2.py:308–320  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

306
307
308def test_side_effects_I():
309 count = 0
310 def counter(lines):
311 nonlocal count
312 count += 1
313 return lines
314
315 counter.has_side_effects = True
316
317 manager = ipt2.TransformerManager()
318 manager.cleanup_transforms.insert(0, counter)
319 assert manager.check_complete("a=1\n") == ('complete', None)
320 assert count == 0
321
322
323

Callers

nothing calls this directly

Calls 1

check_completeMethod · 0.95

Tested by

no test coverage detected