Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
971fd483
Verified
Commit
971fd483
authored
Nov 06, 2021
by
Baptiste Beauplat
Browse files
Excluding some almost always true test in gitstorage from branch coverage
parent
d932f4b9
Changes
1
Show whitespace changes
Inline
Side-by-side
debexpo/tools/gitstorage.py
View file @
971fd483
...
@@ -56,7 +56,9 @@ class GitStorage():
...
@@ -56,7 +56,9 @@ class GitStorage():
return
ref
return
ref
def
remove
(
self
):
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
)
rmtree
(
self
.
repository
)
# def diff(self, upload_from, upload_to):
# def diff(self, upload_from, upload_to):
...
@@ -107,7 +109,9 @@ class GitBackendDulwich():
...
@@ -107,7 +109,9 @@ class GitBackendDulwich():
files
.
update
(
set
(
get_unstaged_changes
(
self
.
repo
.
open_index
(),
files
.
update
(
set
(
get_unstaged_changes
(
self
.
repo
.
open_index
(),
'sources'
)))
'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
))
self
.
repo
.
stage
(
list
(
files
))
def
commit
(
self
):
def
commit
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment