MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_mkdir

Method test_mkdir

Lib/test/test_pathlib/test_pathlib.py:2369–2378  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2367 self.assertEqual(f.read().strip(), b"this is file A")
2368
2369 def test_mkdir(self):
2370 P = self.cls(self.base)
2371 p = P / 'newdirA'
2372 self.assertFalse(p.exists())
2373 p.mkdir()
2374 self.assertTrue(p.exists())
2375 self.assertTrue(p.is_dir())
2376 with self.assertRaises(OSError) as cm:
2377 p.mkdir()
2378 self.assertEqual(cm.exception.errno, errno.EEXIST)
2379
2380 def test_mkdir_parents(self):
2381 # Creating a chain of directories.

Callers

nothing calls this directly

Calls 8

assertFalseMethod · 0.80
assertTrueMethod · 0.80
clsMethod · 0.45
existsMethod · 0.45
mkdirMethod · 0.45
is_dirMethod · 0.45
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected