mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-19 17:19:08 +02: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
|
subprocess
|
||||||
re
|
re
|
||||||
build/*
|
build/*
|
||||||
|
.coverage
|
||||||
|
@ -12,7 +12,7 @@ install:
|
|||||||
script:
|
script:
|
||||||
- flake8 pywal tests setup.py
|
- flake8 pywal tests setup.py
|
||||||
- pylint 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:
|
after_success:
|
||||||
- codecov
|
- codecov
|
||||||
|
@ -67,7 +67,7 @@ def get_args(args):
|
|||||||
|
|
||||||
def process_args(args):
|
def process_args(args):
|
||||||
"""Process 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"
|
print("error: wal needs to be given arguments to run.\n"
|
||||||
" Refer to \"wal -h\" for more info.")
|
" Refer to \"wal -h\" for more info.")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
@ -22,7 +22,7 @@ def imagemagick(color_count, img):
|
|||||||
def gen_colors(img, color_count):
|
def gen_colors(img, color_count):
|
||||||
"""Format the output from imagemagick into a list
|
"""Format the output from imagemagick into a list
|
||||||
of hex colors."""
|
of hex colors."""
|
||||||
if not shutil.which("convert"): # pragma: no cover
|
if not shutil.which("convert"):
|
||||||
print("error: imagemagick not found, exiting...\n"
|
print("error: imagemagick not found, exiting...\n"
|
||||||
"error: wal requires imagemagick to function.")
|
"error: wal requires imagemagick to function.")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user