Make more readable --from-ref / --to-ref aliases for --source / --origin

This commit is contained in:
Anthony Sottile 2020-02-23 11:07:57 -08:00
parent 566f1afcd4
commit d35b00352f
8 changed files with 72 additions and 61 deletions

View file

@ -109,8 +109,8 @@ def test_run_ns_post_checkout():
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.from_ref == 'a'
assert ns.to_ref == 'b'
assert ns.checkout_type == 'c'
@ -140,8 +140,8 @@ def test_run_ns_pre_push_updating_branch(push_example):
assert ns.color is False
assert ns.remote_name == 'origin'
assert ns.remote_url == src
assert ns.source == src_head
assert ns.origin == clone_head
assert ns.from_ref == src_head
assert ns.to_ref == clone_head
assert ns.all_files is False
@ -154,8 +154,8 @@ def test_run_ns_pre_push_new_branch(push_example):
ns = hook_impl._run_ns('pre-push', False, args, stdin)
assert ns is not None
assert ns.source == src_head
assert ns.origin == clone_head
assert ns.from_ref == src_head
assert ns.to_ref == clone_head
def test_run_ns_pre_push_new_branch_existing_rev(push_example):