def tearDown(self): try: mount.umount2(self.target, mount.MNT_FORCE) except mount.MountError: pass os.unlink(os.path.join(self.source, self.test_file)) os.rmdir(self.source) os.rmdir(self.target) os.rmdir(self.tmpdir)
def test_umount2(self): self.test_mount() mount.umount2(self.target, mount.MNT_FORCE) self.assertFalse(os.path.exists(os.path.join(self.target, self.test_file)))