Conditions | 1 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | """Collection of tests around VCS detection.""" |
||
7 | @pytest.mark.parametrize( |
||
8 | 'which_return, result', |
||
9 | [('', False), (None, False), (False, False), ('/usr/local/bin/git', True)], |
||
10 | ) |
||
11 | def test_is_vcs_installed(mocker, which_return, result): |
||
12 | """Verify `is_vcs_installed` function correctly handles `which` answer.""" |
||
13 | mocker.patch('cookiecutter.vcs.which', autospec=True, return_value=which_return) |
||
14 | assert vcs.is_vcs_installed('git') == result |
||
15 |