diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-10-31 11:30:56 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-11-06 17:30:43 +0100 |
commit | ab744d5c452685b4a21559d1a2dcff8d033011bd (patch) | |
tree | 469a708cec8d8a86e25bb5770ffd4111ffe5a825 | |
parent | 68bb3f0ed95b7a8b2488317ff4142507a11d924f (diff) |
GitRepository: fix fetch invocation without repo
-rw-r--r-- | gbp/git.py | 3 | ||||
-rw-r--r-- | tests/test_GitRepository.py | 13 |
2 files changed, 14 insertions, 2 deletions
@@ -743,8 +743,7 @@ class GitRepository(object): @param repo: repository to fetch from @type repo: C{str} """ - if repo: - args = [repo] + args = [repo] if repo else [] self._git_command("fetch", args) diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py index dd713c12..f7e5e97a 100644 --- a/tests/test_GitRepository.py +++ b/tests/test_GitRepository.py @@ -333,6 +333,19 @@ def test_pull(): >>> clone.pull() """ +def test_fetch(): + """ + Fetch from a remote repository + + Methods tested: + - L{gbp.git.GitRepository.fetch} + + >>> import gbp.git, os + >>> d = os.path.join(clone_dir, 'gbp_%s_test_repo' % __name__) + >>> clone = gbp.git.GitRepository(d) + >>> clone.fetch() + """ + def test_create_bare(): """ Create a bare repository |