diff options
Diffstat (limited to 'tests/testutils/repo/git.py')
-rw-r--r-- | tests/testutils/repo/git.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/testutils/repo/git.py b/tests/testutils/repo/git.py index 19ab91601..b9360e9cd 100644 --- a/tests/testutils/repo/git.py +++ b/tests/testutils/repo/git.py @@ -54,9 +54,7 @@ class Git(Repo): def modify_file(self, new_file, path): shutil.copy(new_file, os.path.join(self.repo, path)) - self._run_git( - "commit", path, "-m", "Modified {}".format(os.path.basename(path)) - ) + self._run_git("commit", path, "-m", "Modified {}".format(os.path.basename(path))) return self.latest_commit() def add_submodule(self, subdir, url=None, checkout=None): @@ -92,9 +90,7 @@ class Git(Repo): return config def latest_commit(self): - return self._run_git( - "rev-parse", "HEAD", stdout=subprocess.PIPE, universal_newlines=True, - ).stdout.strip() + return self._run_git("rev-parse", "HEAD", stdout=subprocess.PIPE, universal_newlines=True,).stdout.strip() def branch(self, branch_name): self._run_git("checkout", "-b", branch_name) @@ -110,6 +106,4 @@ class Git(Repo): return self.latest_commit() def rev_parse(self, rev): - return self._run_git( - "rev-parse", rev, stdout=subprocess.PIPE, universal_newlines=True, - ).stdout.strip() + return self._run_git("rev-parse", rev, stdout=subprocess.PIPE, universal_newlines=True,).stdout.strip() |