Verified Commit 971fd483 authored by Baptiste Beauplat's avatar Baptiste Beauplat
Browse files

Excluding some almost always true test in gitstorage from branch coverage

parent d932f4b9
......@@ -56,7 +56,9 @@ class GitStorage():
return ref
def remove(self):
if isdir(self.repository):
# Exclude the False branch from coverage since having the repository
# removed is unlikely to happen and would be an external action
if isdir(self.repository): # pragma: no branch
rmtree(self.repository)
# def diff(self, upload_from, upload_to):
......@@ -107,7 +109,9 @@ class GitBackendDulwich():
files.update(set(get_unstaged_changes(self.repo.open_index(),
'sources')))
if len(files) != 0:
# Exclude the False branch from coverage. In practice, there is always
# files present in debian/ with accepted packages
if len(files) != 0: # pragma: no branch
self.repo.stage(list(files))
def commit(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment