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

Function test_cd_force_quiet

IPython/core/tests/test_magic.py:514–528  ·  view source on GitHub ↗

Test OSMagics.cd_force_quiet option

()

Source from the content-addressed store, hash-verified

512
513
514def test_cd_force_quiet():
515 """Test OSMagics.cd_force_quiet option"""
516 _ip.config.OSMagics.cd_force_quiet = True
517 osmagics = osm.OSMagics(shell=_ip)
518
519 startdir = os.getcwd()
520 ipdir = os.path.realpath(_ip.ipython_dir)
521
522 try:
523 with tt.AssertNotPrints(ipdir):
524 osmagics.cd('"%s"' % ipdir)
525 with tt.AssertNotPrints(startdir):
526 osmagics.cd('-')
527 finally:
528 os.chdir(startdir)
529
530
531def test_xmode():

Callers

nothing calls this directly

Calls 1

cdMethod · 0.95

Tested by

no test coverage detected