Move patch one level up because importlib brakes all the CI tools.

This commit is contained in:
Alex Vykaliuk
2017-07-15 14:52:22 +02:00
parent 7aee728b8d
commit a8ed0e4322

View File

@ -74,19 +74,19 @@ def test_run_path(runner, capsys):
@all_runners
def test_install_requirements_for_dir(runner):
dirname = get_examples_path('types')
with patch('pip.main') as pip_mock:
with patch('bonobo.commands.run._install_requirements') as install_mock:
runner('run', '--install', dirname)
pip_mock.assert_called_once_with(
['install', '-r', os.path.join(dirname, 'requirements.txt')])
install_mock.assert_called_once_with(
os.path.join(dirname, 'requirements.txt'))
@all_runners
def test_install_requirements_for_file(runner):
dirname = get_examples_path('types')
with patch('pip.main') as pip_mock:
with patch('bonobo.commands.run._install_requirements') as install_mock:
runner('run', '--install', os.path.join(dirname, 'strings.py'))
pip_mock.assert_called_once_with(
['install', '-r', os.path.join(dirname, 'requirements.txt')])
install_mock.assert_called_once_with(
os.path.join(dirname, 'requirements.txt'))
@all_runners