remove vcs integration

This commit is contained in:
Anthony Sottile 2021-03-29 19:01:59 -07:00
parent 434c108f74
commit 1a1d850e99
13 changed files with 2 additions and 659 deletions

View file

@ -1,29 +0,0 @@
"""Tests around functionality in the git integration."""
import mock
import pytest
from flake8.main import git
@pytest.mark.parametrize('lazy', [True, False])
def test_find_modified_files(lazy):
"""Confirm our logic for listing modified files."""
if lazy:
# Here --cached is missing
call = [
'git', 'diff-index', '--name-only', '--diff-filter=ACMRTUXB',
'HEAD'
]
else:
call = [
'git', 'diff-index', '--cached', '--name-only',
'--diff-filter=ACMRTUXB', 'HEAD'
]
mocked_popen = mock.Mock()
mocked_popen.communicate.return_value = ('', '')
with mock.patch('flake8.main.git.piped_process') as piped_process:
piped_process.return_value = mocked_popen
git.find_modified_files(lazy)
piped_process.assert_called_once_with(call)