mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 17:14:43 +04:00
Merge 3a3fe94760 into 8416413a0e
This commit is contained in:
commit
5f713f8112
2 changed files with 15 additions and 1 deletions
|
|
@ -29,6 +29,13 @@ def test_adjust_args_and_chdir_not_in_git_dir(in_tmpdir):
|
|||
main._adjust_args_and_chdir(_args())
|
||||
|
||||
|
||||
def test_adjust_args_and_chdir_relpath_to_different_drive():
|
||||
args = _args(command='run', files=['f1', 'f2'])
|
||||
with mock.patch.object(os.path, 'relpath', side_effect=ValueError):
|
||||
with pytest.raises(ValueError):
|
||||
main._adjust_args_and_chdir(args)
|
||||
|
||||
|
||||
def test_adjust_args_and_chdir_noop(in_git_dir):
|
||||
args = _args(command='run', files=['f1', 'f2'])
|
||||
main._adjust_args_and_chdir(args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue