本文整理汇总了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')