本文整理汇总了Python中tests.FlexGetBase类的典型用法代码示例。如果您正苦于以下问题:Python FlexGetBase类的具体用法?Python FlexGetBase怎么用?Python FlexGetBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FlexGetBase类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: teardown
def teardown(self):
FlexGetBase.teardown(self)
if getattr(self, 'testfile', None) and os.path.exists(self.testfile):
os.remove(self.testfile)
temp_dir = os.path.join(self.manager.config_base, 'temp')
if os.path.exists(temp_dir) and os.path.isdir(temp_dir):
os.rmdir(temp_dir)
示例2: teardown
def teardown(self):
curdir = os.getcwd()
os.chdir(self.test_home)
for test_dir in self.test_dirs:
os.removedirs(test_dir)
os.chdir(curdir)
os.rmdir(self.test_home)
FlexGetBase.teardown(self)
示例3: setup
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))
示例4: setup
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()
示例5: setup
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 = {}
示例6: __init__
def __init__(self):
self.client = app.test_client()
FlexGetBase.__init__(self)
示例7: teardown
def teardown(self):
for dir in self.test_dirs:
os.rmdir(os.path.join(self.test_home, dir))
os.rmdir(self.test_home)
FlexGetBase.teardown(self)
示例8: __init__
def __init__(self):
self.test_home = None
FlexGetBase.__init__(self)
示例9: __init__
def __init__(self):
self.testfile = None
FlexGetBase.__init__(self)
示例10: setup
def setup(self):
FlexGetBase.setup(self)
self.execute_task('test')
示例11: setup
def setup(self):
FlexGetBase.setup(self)
self.execute_feed('test')