aboutsummaryrefslogtreecommitdiff
path: root/gitosis/repository.py
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-12-18 00:53:27 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2007-12-18 01:12:22 -0800
commit436463e7874524b21d70bdd9bb2be8bae1d3441c (patch)
tree020b0581a4b3d2e3036131deaa41348c3f846a29 /gitosis/repository.py
parentAdd some more testcases. (diff)
downloadgitosis-dakkar-436463e7874524b21d70bdd9bb2be8bae1d3441c.tar.gz
gitosis-dakkar-436463e7874524b21d70bdd9bb2be8bae1d3441c.tar.bz2
gitosis-dakkar-436463e7874524b21d70bdd9bb2be8bae1d3441c.zip
Add more testcases, and add coverage exclusion notations on places where we do test the the content functions already, or they interact with the system too much to test for coverage automatically.
Diffstat (limited to 'gitosis/repository.py')
-rw-r--r--gitosis/repository.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gitosis/repository.py b/gitosis/repository.py
index 47ebc1e..db74046 100644
--- a/gitosis/repository.py
+++ b/gitosis/repository.py
@@ -52,7 +52,7 @@ def init(
stdout=sys.stderr,
close_fds=True,
)
- if returncode != 0:
+ if returncode != 0: #pragma: no cover
raise GitInitError('exit status %d' % returncode)
@@ -108,7 +108,7 @@ data %(commit_msg_len)d
child.stdin.write('M 100644 :%d %s\n' % (index+1, path))
child.stdin.close()
returncode = child.wait()
- if returncode != 0:
+ if returncode != 0: #pragma: no cover
raise GitFastImportError(
'git fast-import failed', 'exit status %d' % returncode)
@@ -134,7 +134,7 @@ def export(git_dir, path):
],
close_fds=True,
)
- if returncode != 0:
+ if returncode != 0: #pragma: no cover
raise GitReadTreeError('exit status %d' % returncode)
# jumping through hoops to be compatible with git versions
# that don't have --work-tree=
@@ -153,7 +153,7 @@ def export(git_dir, path):
close_fds=True,
env=env,
)
- if returncode != 0:
+ if returncode != 0: #pragma: no cover
raise GitCheckoutIndexError('exit status %d' % returncode)
class GitHasInitialCommitError(GitError):
@@ -183,5 +183,5 @@ def has_initial_commit(git_dir):
return False
elif re.match('^[0-9a-f]{40}\n$', got):
return True
- else:
+ else: #pragma: no cover
raise GitHasInitialCommitError('Unknown git HEAD: %r' % got)