(self)
| 1667 | self.assertEqual(cm.exception.errno, errno.ENOENT) |
| 1668 | |
| 1669 | def test_explicit_cleanup(self): |
| 1670 | # A TemporaryDirectory is deleted when cleaned up |
| 1671 | dir = tempfile.mkdtemp() |
| 1672 | try: |
| 1673 | d = self.do_create(dir=dir) |
| 1674 | self.assertTrue(os.path.exists(d.name), |
| 1675 | "TemporaryDirectory %s does not exist" % d.name) |
| 1676 | d.cleanup() |
| 1677 | self.assertFalse(os.path.exists(d.name), |
| 1678 | "TemporaryDirectory %s exists after cleanup" % d.name) |
| 1679 | finally: |
| 1680 | os.rmdir(dir) |
| 1681 | |
| 1682 | def test_explicit_cleanup_ignore_errors(self): |
| 1683 | """Test that cleanup doesn't return an error when ignoring them.""" |
nothing calls this directly
no test coverage detected