Use file:// protocol for cloning under test

This commit is contained in:
Anthony Sottile 2017-09-22 10:25:02 -07:00
parent e76bc17f53
commit 989bcfe9ca
4 changed files with 7 additions and 3 deletions

View file

@ -10,6 +10,7 @@ from pre_commit.languages.golang import guess_go_dir
('url', 'expected'),
(
('/im/a/path/on/disk', 'unknown_src_dir'),
('file:///im/a/path/on/disk', 'unknown_src_dir'),
('git@github.com:golang/lint', 'github.com/golang/lint'),
('git://github.com/golang/lint', 'github.com/golang/lint'),
('http://github.com/golang/lint', 'github.com/golang/lint'),

View file

@ -714,7 +714,7 @@ def test_hook_id_not_present(tempdir_factory, store, fake_log_handler):
with pytest.raises(SystemExit):
repo.require_installed()
assert fake_log_handler.handle.call_args[0][0].msg == (
'`i-dont-exist` is not present in repository {}. '
'`i-dont-exist` is not present in repository file://{}. '
'Typo? Perhaps it is introduced in a newer version? '
'Often `pre-commit autoupdate` fixes this.'.format(path)
)