test removepath
(self)
| 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""" |
nothing calls this directly
no test coverage detected