mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Actually print while installing
This commit is contained in:
parent
8f51bf2d0b
commit
02f0a1c434
6 changed files with 42 additions and 27 deletions
|
|
@ -254,18 +254,21 @@ def test_languages(tmpdir_factory, store):
|
|||
assert repo.languages == set([('python', 'default')])
|
||||
|
||||
|
||||
def test_reinstall(tmpdir_factory, store):
|
||||
def test_reinstall(tmpdir_factory, store, log_info_mock):
|
||||
path = make_repo(tmpdir_factory, 'python_hooks_repo')
|
||||
config = make_config_from_repo(path)
|
||||
repo = Repository.create(config, store)
|
||||
repo.require_installed()
|
||||
# We print some logging during clone (1) + install (3)
|
||||
assert log_info_mock.call_count == 4
|
||||
log_info_mock.reset_mock()
|
||||
# Reinstall with same repo should not trigger another install
|
||||
# TODO: how to assert this?
|
||||
repo.require_installed()
|
||||
assert log_info_mock.call_count == 0
|
||||
# Reinstall on another run should not trigger another install
|
||||
# TODO: how to assert this?
|
||||
repo = Repository.create(config, store)
|
||||
repo.require_installed()
|
||||
assert log_info_mock.call_count == 0
|
||||
|
||||
|
||||
def test_control_c_control_c_on_install(tmpdir_factory, store):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue