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

Function test_ensure_dir_exists

IPython/utils/tests/test_path.py:409–418  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

407
408@onlyif_unicode_paths
409def test_ensure_dir_exists():
410 with TemporaryDirectory() as td:
411 d = os.path.join(td, '∂ir')
412 path.ensure_dir_exists(d) # create it
413 assert os.path.isdir(d)
414 path.ensure_dir_exists(d) # no-op
415 f = os.path.join(td, 'ƒile')
416 open(f, 'w').close() # touch
417 with nt.assert_raises(IOError):
418 path.ensure_dir_exists(f)
419
420class TestLinkOrCopy(unittest.TestCase):
421 def setUp(self):

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected