本文整理匯總了Python中tests.FlexGetBase.setup方法的典型用法代碼示例。如果您正苦於以下問題:Python FlexGetBase.setup方法的具體用法?Python FlexGetBase.setup怎麽用?Python FlexGetBase.setup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tests.FlexGetBase
的用法示例。
在下文中一共展示了FlexGetBase.setup方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: setup
# 需要導入模塊: from tests import FlexGetBase [as 別名]
# 或者: from tests.FlexGetBase import setup [as 別名]
def setup(self):
FlexGetBase.setup(self)
# generate config
self.test_home = maketemp()
for task_name in self.manager.config['tasks'].iterkeys():
if isinstance(self.manager.config['tasks'][task_name]['exists_series'], dict):
self.manager.config['tasks'][task_name]['exists_series']['path'] = self.test_home
else:
self.manager.config['tasks'][task_name]['exists_series'] = self.test_home
# create test dirs
for dir in self.test_dirs:
os.mkdir(os.path.join(self.test_home, dir))
示例2: setup
# 需要導入模塊: from tests import FlexGetBase [as 別名]
# 或者: from tests.FlexGetBase import setup [as 別名]
def setup(self):
FlexGetBase.setup(self)
# generate config
self.test_home = maketemp()
for task_name in self.manager.config['tasks'].iterkeys():
if isinstance(self.manager.config['tasks'][task_name]['exists_movie'], dict):
self.manager.config['tasks'][task_name]['exists_movie']['path'] = self.test_home
else:
self.manager.config['tasks'][task_name]['exists_movie'] = self.test_home
# create test dirs
for test_dir in self.test_dirs:
os.makedirs(os.path.join(self.test_home, test_dir))
# create test files
for test_file in self.test_files:
open(os.path.join(self.test_home, test_file), 'a').close()
示例3: setup
# 需要導入模塊: from tests import FlexGetBase [as 別名]
# 或者: from tests.FlexGetBase import setup [as 別名]
def setup(self):
FlexGetBase.setup(self)
# reset input cache so that the cache is not used for second execution
from flexget.utils.cached_input import cached
cached.cache = {}
示例4: setup
# 需要導入模塊: from tests import FlexGetBase [as 別名]
# 或者: from tests.FlexGetBase import setup [as 別名]
def setup(self):
FlexGetBase.setup(self)
self.execute_task('test')
示例5: setup
# 需要導入模塊: from tests import FlexGetBase [as 別名]
# 或者: from tests.FlexGetBase import setup [as 別名]
def setup(self):
FlexGetBase.setup(self)
self.execute_feed('test')