update usage of mocker
@@ -92,9 +92,9 @@ def test_runner_folders(tmp_path, mocker):
test_data_samples_path = create_dir('test_data_samples_path', root=tmp_path)
sandbox_path = create_dir('sandbox', root=tmp_path)
- with mocker.patch('substra.runner.docker'), \
+ mocker.patch('substra.runner.docker')
mocker.patch('substra.runner._docker_run',
- side_effect=docker_run_side_effect(sandbox_path)):
+ side_effect=docker_run_side_effect(sandbox_path))
runner.compute(
algo_path=algo_path,
train_opener_file=train_opener_path,
@@ -132,9 +132,9 @@ def test_runner_archives(mocker, tmp_path):
z.write(create_file('Dockerfile', root=tmp_path))
z.write(create_file('metrics.py', root=tmp_path))
- with mocker.patch('substra.runner.docker'), \
+ mocker.patch('substra.runner.docker'), \
mocker.patch('substra.runner._docker_run',
- side_effect=docker_run_side_effect(sandbox_path)):
+ side_effect=docker_run_side_effect(sandbox_path))
runner.compute(
algo_path=algo_path,
train_opener_file=train_opener_path,
