def setUp(self):
"""
Tests setup.
"""
self._orig_environ = dict(os.environ)
# create a temporary default config file
_, self.file_path = tempfile.mkstemp(
suffix='.yml',
dir=tempfile.tempdir
)
with open(self.file_path, 'w') as outfile:
yaml.dump(TEST_CONFIG, outfile, default_flow_style=False)
os.environ['VIDEO_PIPELINE_CFG'] = self.file_path
# create a temporary static config file
_, self.static_file_path = tempfile.mkstemp(
suffix='.yml',
dir=tempfile.tempdir
)
with open(self.static_file_path, 'w') as outfile:
yaml.dump(TEST_STATIC_CONFIG, outfile, default_flow_style=False)
评论列表
文章目录