diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-03-19 16:12:00 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-03-20 18:29:14 +0900 |
commit | 0f6b75dc7e7508c2806c92326d725ff4a777362e (patch) | |
tree | 7866b3c0ab09537776b51a204fb7e80ce756b4ff | |
parent | 83a18f9856b346f2686fcf8857a4458b312137e9 (diff) | |
download | buildstream-0f6b75dc7e7508c2806c92326d725ff4a777362e.tar.gz |
testutils/repo/git.py: Added branch() method
In order to test tracking on multiple branches, lets use
the Git repo scaffolding.
-rw-r--r-- | tests/testutils/repo/git.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/testutils/repo/git.py b/tests/testutils/repo/git.py index 2a20bc331..9d527f904 100644 --- a/tests/testutils/repo/git.py +++ b/tests/testutils/repo/git.py @@ -68,3 +68,6 @@ class Git(Repo): 'git', 'rev-parse', 'master' ], env=GIT_ENV, cwd=self.repo) return output.decode('UTF-8').strip() + + def branch(self, branch_name): + subprocess.call(['git', 'checkout', '-b', branch_name], env=GIT_ENV, cwd=self.repo) |