MCPcopy
hub / github.com/deadc0de6/dotdrop / test_removepath

Method test_removepath

tests/test_misc.py:40–55  ·  view source on GitHub ↗

test removepath

(self)

Source from the content-addressed store, hash-verified

38 """test case"""
39
40 def test_removepath(self):
41 """test removepath"""
42 removepath('')
43
44 tmpdir = get_tempdir()
45 self.addCleanup(clean, tmpdir)
46 afile, _ = create_random_file(tmpdir, content='blah')
47
48 try:
49 removepath(afile)
50 except OSError:
51 self.fail('must not raise OSError')
52 if os.path.exists(afile):
53 self.fail(f'{afile} not deleted')
54 with self.assertRaises(OSError):
55 removepath(os.path.expanduser('~'))
56
57 def test_dirempty(self):
58 """dir_empty"""

Callers

nothing calls this directly

Calls 3

removepathFunction · 0.90
get_tempdirFunction · 0.90
create_random_fileFunction · 0.90

Tested by

no test coverage detected