From 436463e7874524b21d70bdd9bb2be8bae1d3441c Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Tue, 18 Dec 2007 00:53:27 -0800 Subject: 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. --- gitosis/repository.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gitosis/repository.py') 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) -- cgit v1.2.3