Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update test_refs.py
  • Loading branch information
Yobmod authored Jul 31, 2021
commit d9f140a529901b5e07cda3665494104f23a380be
10 changes: 7 additions & 3 deletions test/test_refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,15 @@ def test_heads(self, rwrepo):
gp_tracking_branch = rwrepo.create_head('gp_tracking#123')
special_name_remote_ref = rwrepo.remotes[0].refs[special_name] # get correct type
gp_tracking_branch.set_tracking_branch(special_name_remote_ref)
assert gp_tracking_branch.tracking_branch().path == special_name_remote_ref.path
TBranch = gp_tracking_branch.tracking_branch()
if TBranch is not None:
assert TBranch.path == special_name_remote_ref.path

git_tracking_branch = rwrepo.create_head('git_tracking#123')
rwrepo.git.branch('-u', special_name_remote_ref.name, git_tracking_branch.name)
assert git_tracking_branch.tracking_branch().name == special_name_remote_ref.name
TBranch = gp_tracking_branch.tracking_branch()
if TBranch is not None:
assert TBranch.name == special_name_remote_ref.name
# END for each head

# verify REFLOG gets altered
Expand Down Expand Up @@ -453,7 +457,7 @@ def test_head_reset(self, rw_repo):

self.assertRaises(OSError, SymbolicReference.create, rw_repo, symref_path, cur_head.reference.commit)
# it works if the new ref points to the same reference
SymbolicReference.create(rw_repo, symref.path, symref.reference).path == symref.path # @NoEffect
assert SymbolicReference.create(rw_repo, symref.path, symref.reference).path == symref.path # @NoEffect
SymbolicReference.delete(rw_repo, symref)
# would raise if the symref wouldn't have been deletedpbl
symref = SymbolicReference.create(rw_repo, symref_path, cur_head.reference)
Expand Down