src, add unit command

This commit is contained in:
jbannon 2022-04-29 18:00:03 +00:00
parent 6ec57087e7
commit 92b0286af8
2 changed files with 7 additions and 0 deletions

View file

@ -35,3 +35,8 @@ ignore = [
"D413", # Missing blank line after last section "D413", # Missing blank line after last section
"D415", # Should end with a period "D415", # Should end with a period
] ]
[tool.coverage.run]
source = [
"src/ytdl_sub"
]

View file

@ -2,6 +2,8 @@
if [[ $1 = "html" ]]; then if [[ $1 = "html" ]]; then
coverage run -m pytest && coverage html coverage run -m pytest && coverage html
elif [[ $1 = "unit" ]]; then
coverage run -m pytest tests/unit && coverage report
else else
coverage run -m pytest && coverage report coverage run -m pytest && coverage report
fi fi