def test_finalize(self): f = OutPath() path = str(f) self.assertTrue(os.path.isfile(path)) f._finalize() self.assertFalse(os.path.isfile(path))