diff options
Diffstat (limited to 'tests/testutils/repo/git.py')
-rw-r--r-- | tests/testutils/repo/git.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/testutils/repo/git.py b/tests/testutils/repo/git.py index 99b6bb384..5587baacb 100644 --- a/tests/testutils/repo/git.py +++ b/tests/testutils/repo/git.py @@ -64,6 +64,12 @@ class Git(Repo): subprocess.call(['git', 'commit', '-m', 'Added the submodule'], env=GIT_ENV, cwd=self.repo) return self.latest_commit() + # This can also be used to a file or a submodule + def remove_path(self, path): + subprocess.call(['git', 'rm', path], env=GIT_ENV, cwd=self.repo) + subprocess.call(['git', 'commit', '-m', 'Removing {}'.format(path)], env=GIT_ENV, cwd=self.repo) + return self.latest_commit() + def source_config(self, ref=None, checkout_submodules=None): config = { 'kind': 'git', |