Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import os
|
||||
import runpy
|
||||
import sys
|
||||
from unittest.mock import patch
|
||||
@ -72,6 +73,24 @@ def test_run_path(runner, capsys):
|
||||
assert out[2].startswith('Baz ')
|
||||
|
||||
|
||||
@all_runners
|
||||
def test_install_requirements_for_dir(runner):
|
||||
dirname = get_examples_path('types')
|
||||
with patch('bonobo.commands.run._install_requirements') as install_mock:
|
||||
runner('run', '--install', dirname)
|
||||
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('bonobo.commands.run._install_requirements') as install_mock:
|
||||
runner('run', '--install', os.path.join(dirname, 'strings.py'))
|
||||
install_mock.assert_called_once_with(
|
||||
os.path.join(dirname, 'requirements.txt'))
|
||||
|
||||
|
||||
@all_runners
|
||||
def test_version(runner, capsys):
|
||||
runner('version')
|
||||
|
||||
Reference in New Issue
Block a user