mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add post-checkout
This commit is contained in:
parent
1c641b1c28
commit
18fa004254
9 changed files with 77 additions and 5 deletions
|
|
@ -104,6 +104,16 @@ def test_run_ns_commit_msg():
|
|||
assert ns.commit_msg_filename == '.git/COMMIT_MSG'
|
||||
|
||||
|
||||
def test_run_ns_post_checkout():
|
||||
ns = hook_impl._run_ns('post-checkout', True, ('a', 'b', 'c'), b'')
|
||||
assert ns is not None
|
||||
assert ns.hook_stage == 'post-checkout'
|
||||
assert ns.color is True
|
||||
assert ns.source == 'a'
|
||||
assert ns.origin == 'b'
|
||||
assert ns.checkout_type == 'c'
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def push_example(tempdir_factory):
|
||||
src = git_dir(tempdir_factory)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue