Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1a360c8

Browse files
authored
Update test_refs.py
1 parent9110b98 commit1a360c8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

‎test/test_refs.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,15 @@ def test_heads(self, rwrepo):
125125
gp_tracking_branch=rwrepo.create_head('gp_tracking#123')
126126
special_name_remote_ref=rwrepo.remotes[0].refs[special_name]# get correct type
127127
gp_tracking_branch.set_tracking_branch(special_name_remote_ref)
128-
assertgp_tracking_branch.tracking_branch().path==special_name_remote_ref.path
128+
TBranch=gp_tracking_branch.tracking_branch()
129+
ifTBranchisnotNone:
130+
assertTBranch.path==special_name_remote_ref.path
129131

130132
git_tracking_branch=rwrepo.create_head('git_tracking#123')
131133
rwrepo.git.branch('-u',special_name_remote_ref.name,git_tracking_branch.name)
132-
assertgit_tracking_branch.tracking_branch().name==special_name_remote_ref.name
134+
TBranch=gp_tracking_branch.tracking_branch()
135+
ifTBranchisnotNone:
136+
assertTBranch.name==special_name_remote_ref.name
133137
# END for each head
134138

135139
# verify REFLOG gets altered
@@ -453,7 +457,7 @@ def test_head_reset(self, rw_repo):
453457

454458
self.assertRaises(OSError,SymbolicReference.create,rw_repo,symref_path,cur_head.reference.commit)
455459
# it works if the new ref points to the same reference
456-
SymbolicReference.create(rw_repo,symref.path,symref.reference).path==symref.path# @NoEffect
460+
assertSymbolicReference.create(rw_repo,symref.path,symref.reference).path==symref.path# @NoEffect
457461
SymbolicReference.delete(rw_repo,symref)
458462
# would raise if the symref wouldn't have been deletedpbl
459463
symref=SymbolicReference.create(rw_repo,symref_path,cur_head.reference)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp