mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Remove Runner.cmd_runner and Store.cmd_runner
This commit is contained in:
parent
95c3afacda
commit
6141c419ee
8 changed files with 65 additions and 120 deletions
|
|
@ -7,7 +7,6 @@ import subprocess
|
|||
import sys
|
||||
from collections import OrderedDict
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
|
||||
import pre_commit.constants as C
|
||||
|
|
@ -327,11 +326,10 @@ def test_origin_source_error_msg(
|
|||
assert warning_msg not in printed
|
||||
|
||||
|
||||
@pytest.mark.parametrize(('output', 'expected'), (('some', True), ('', False)))
|
||||
def test_has_unmerged_paths(output, expected):
|
||||
mock_runner = mock.Mock()
|
||||
mock_runner.cmd_runner.run.return_value = (1, output, '')
|
||||
assert _has_unmerged_paths(mock_runner) is expected
|
||||
def test_has_unmerged_paths(in_merge_conflict):
|
||||
assert _has_unmerged_paths() is True
|
||||
cmd_output('git', 'add', '.')
|
||||
assert _has_unmerged_paths() is False
|
||||
|
||||
|
||||
def test_merge_conflict(cap_out, in_merge_conflict, mock_out_store_directory):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue