def test_info_plist_missing(self): """Info.plist missing""" delete_info_plist() try: with self.assertRaises(IOError): Workflow() finally: create_info_plist()
def tearDown(self): create_info_plist() self.wf.reset() try: self.wf.delete_password(self.account) except PasswordNotFound: pass for dirpath in (self.wf.cachedir, self.wf.datadir): if os.path.exists(dirpath): shutil.rmtree(dirpath) self._teardown_env() delete_info_plist()
def ctx(args=None, update_settings=None, clear=True): update_settings = update_settings or UPDATE_SETTINGS args = args or [] c = dummy() if args: # Add placeholder for ARGV[0] args = ['script'] + args create_info_plist() if args: c = WorkflowMock(args) with c: wf = Workflow(update_settings=update_settings) yield wf, c if clear: wf.reset() delete_info_plist()
def tearDown(self): delete_info_plist()