MCPcopy Index your code
hub / github.com/ipython/ipython / _decorator_skip_setup

Function _decorator_skip_setup

tests/test_debugger.py:447–474  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

445
446
447def _decorator_skip_setup():
448 import pexpect
449
450 env = os.environ.copy()
451 env["IPY_TEST_SIMPLE_PROMPT"] = "1"
452 env["PROMPT_TOOLKIT_NO_CPR"] = "1"
453
454 child = pexpect.spawn(
455 sys.executable, ["-m", "IPython", "--colors=nocolor"], env=env
456 )
457 child.timeout = 15 * IPYTHON_TESTING_TIMEOUT_SCALE
458
459 child.expect("IPython")
460 child.expect("\n")
461
462 child.timeout = 5 * IPYTHON_TESTING_TIMEOUT_SCALE
463 child.str_last_chars = 500
464
465 dedented_blocks = [dedent(b).strip() for b in skip_decorators_blocks]
466 in_prompt_number = 1
467 for cblock in dedented_blocks:
468 child.expect_exact(f"In [{in_prompt_number}]:")
469 in_prompt_number += 1
470 for line in cblock.splitlines():
471 child.sendline(line)
472 child.expect_exact(line)
473 child.sendline("")
474 return child
475
476
477@pytest.mark.skip(reason="recently fail for unknown reason on CI")

Callers 2

test_decorator_skipFunction · 0.85

Calls 2

dedentFunction · 0.85
copyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…