def test_RemoveDirectory_succeeds_with_slash(self): RemoveDirectory.local("testing", self.dir + "/") self.assertFalse(os.path.exists(self.dir)) self.assertFalse(os.path.exists("/tmp/emptyForRemovePatched"))
def test_RemoveDirectory_with_nonexistent_dir_succeeds(self): RemoveDirectory.local("testing", "/doesnotexist") self.assertTrue(os.path.exists(self.dir))
def tearDown(self): RemoveDirectory.local("", self.dir) Command.propagate_env_map.clear() super(CommandsUnix, self).tearDown()