diff options
| author | Yobmod <yobmod@gmail.com> | 2021-07-28 16:26:35 +0100 |
|---|---|---|
| committer | Yobmod <yobmod@gmail.com> | 2021-07-28 16:26:35 +0100 |
| commit | 28fdd30a579362a1121fa7e81d8051098b31f2d1 (patch) | |
| tree | 398ac4b11472045a6b084e2e4f92e1fcda751b5a /test/test_refs.py | |
| parent | 77a77695b487bf287a5f488ebc7ceadd96e692ae (diff) | |
| download | gitpython-28fdd30a579362a1121fa7e81d8051098b31f2d1.tar.gz | |
Fix SymbolicReference reference typing
Diffstat (limited to 'test/test_refs.py')
| -rw-r--r-- | test/test_refs.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test_refs.py b/test/test_refs.py index 1315f885..6f158bee 100644 --- a/test/test_refs.py +++ b/test/test_refs.py @@ -4,6 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php +from git.repo.base import Repo from itertools import chain from git import ( @@ -125,11 +126,15 @@ class TestRefs(TestBase): 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 |
