From 0f6b75dc7e7508c2806c92326d725ff4a777362e Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Mon, 19 Mar 2018 16:12:00 +0900 Subject: testutils/repo/git.py: Added branch() method In order to test tracking on multiple branches, lets use the Git repo scaffolding. --- tests/testutils/repo/git.py | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit v1.2.1