mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-05 21:48:55 +01:00
tests: Add .coveragerc
This commit is contained in:
parent
2bb741f9e1
commit
c7391d7c92
11
.coveragerc
Normal file
11
.coveragerc
Normal file
@ -0,0 +1,11 @@
|
||||
[report]
|
||||
exclude_lines =
|
||||
pragma: no cover
|
||||
|
||||
if not len\(sys\.argv\) > 1:
|
||||
def main\(\):
|
||||
if __name__ == .__main__.:
|
||||
if not shutil\.which\(.convert.\):
|
||||
except PermissionError:
|
||||
|
||||
omit = pywal/wallpaper.py,pywal/reload.py
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ pywal.egg-info/*
|
||||
subprocess
|
||||
re
|
||||
build/*
|
||||
.coverage
|
||||
|
@ -12,7 +12,7 @@ install:
|
||||
script:
|
||||
- flake8 pywal tests setup.py
|
||||
- pylint pywal tests setup.py
|
||||
- coverage run --omit=pywal/wallpaper.py,pywal/reload.py --source=pywal/ ./setup.py test
|
||||
- coverage run --source=pywal/ ./setup.py test
|
||||
|
||||
after_success:
|
||||
- codecov
|
||||
|
@ -67,7 +67,7 @@ def get_args(args):
|
||||
|
||||
def process_args(args):
|
||||
"""Process args."""
|
||||
if not len(sys.argv) > 1: # pragma: no cover
|
||||
if not len(sys.argv) > 1:
|
||||
print("error: wal needs to be given arguments to run.\n"
|
||||
" Refer to \"wal -h\" for more info.")
|
||||
exit(1)
|
||||
|
@ -22,7 +22,7 @@ def imagemagick(color_count, img):
|
||||
def gen_colors(img, color_count):
|
||||
"""Format the output from imagemagick into a list
|
||||
of hex colors."""
|
||||
if not shutil.which("convert"): # pragma: no cover
|
||||
if not shutil.which("convert"):
|
||||
print("error: imagemagick not found, exiting...\n"
|
||||
"error: wal requires imagemagick to function.")
|
||||
exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user