Enable integration tests to be run concurrently
This commit is contained in:
parent
640001a7f5
commit
8b1a3d9abc
1 changed files with 12 additions and 12 deletions
|
@ -13,29 +13,29 @@ from bdfr.__main__ import cli
|
||||||
does_test_config_exist = Path('test_config.cfg').exists()
|
does_test_config_exist = Path('test_config.cfg').exists()
|
||||||
|
|
||||||
|
|
||||||
def copy_test_config(tmp_path: Path):
|
def copy_test_config(run_path: Path):
|
||||||
shutil.copy(Path('test_config.cfg'), Path(tmp_path, 'test_config.cfg'))
|
shutil.copy(Path('test_config.cfg'), Path(run_path, 'test_config.cfg'))
|
||||||
|
|
||||||
|
|
||||||
def create_basic_args_for_download_runner(test_args: list[str], tmp_path: Path):
|
def create_basic_args_for_download_runner(test_args: list[str], run_path: Path):
|
||||||
copy_test_config(tmp_path)
|
copy_test_config(run_path)
|
||||||
out = [
|
out = [
|
||||||
'download', str(tmp_path),
|
'download', str(run_path),
|
||||||
'-v',
|
'-v',
|
||||||
'--config', str(Path(tmp_path, 'test_config.cfg')),
|
'--config', str(Path(run_path, 'test_config.cfg')),
|
||||||
'--log', str(Path(tmp_path, 'test_log.txt')),
|
'--log', str(Path(run_path, 'test_log.txt')),
|
||||||
] + test_args
|
] + test_args
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
|
||||||
def create_basic_args_for_archive_runner(test_args: list[str], tmp_path: Path):
|
def create_basic_args_for_archive_runner(test_args: list[str], run_path: Path):
|
||||||
copy_test_config(tmp_path)
|
copy_test_config(run_path)
|
||||||
out = [
|
out = [
|
||||||
'archive',
|
'archive',
|
||||||
str(tmp_path),
|
str(run_path),
|
||||||
'-v',
|
'-v',
|
||||||
'--config', str(Path(tmp_path, 'test_config.cfg')),
|
'--config', str(Path(run_path, 'test_config.cfg')),
|
||||||
'--log', str(Path(tmp_path, 'test_log.txt')),
|
'--log', str(Path(run_path, 'test_log.txt')),
|
||||||
] + test_args
|
] + test_args
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue