generated from daniil-berg/boilerplate-py
Optimize coverage script/settings
This commit is contained in:
parent
cf02206588
commit
3a8fcb2d5a
@ -1,8 +1,7 @@
|
|||||||
[run]
|
[run]
|
||||||
source = src/
|
source = src/
|
||||||
branch = true
|
branch = true
|
||||||
omit =
|
command_line = -m unittest discover
|
||||||
.venv/*
|
|
||||||
|
|
||||||
[report]
|
[report]
|
||||||
fail_under = 100
|
fail_under = 100
|
||||||
@ -11,5 +10,4 @@ skip_covered = False
|
|||||||
exclude_lines =
|
exclude_lines =
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
if __name__ == ['"]__main__['"]:
|
if __name__ == ['"]__main__['"]:
|
||||||
omit =
|
if sys.version_info.+:
|
||||||
tests/*
|
|
||||||
|
13
coverage.sh
13
coverage.sh
@ -12,13 +12,14 @@
|
|||||||
# You should have received a copy of the GNU Lesser General Public License along with asyncio-taskpool.
|
# You should have received a copy of the GNU Lesser General Public License along with asyncio-taskpool.
|
||||||
# If not, see <https://www.gnu.org/licenses/>.
|
# If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
coverage erase && coverage run -m unittest discover 2> /dev/null
|
coverage erase
|
||||||
|
coverage run 2> /dev/null
|
||||||
|
|
||||||
typeset total
|
typeset report=$(coverage report)
|
||||||
total=$(coverage report | awk '$1 == "TOTAL" {print $NF}')
|
typeset total=$(echo "${report}" | awk '$1 == "TOTAL" {print $NF; exit}')
|
||||||
|
|
||||||
if [[ $total == 100% ]]; then
|
if [[ ${total} == 100% ]]; then
|
||||||
echo $total
|
echo ${total}
|
||||||
else
|
else
|
||||||
coverage report
|
echo "${report}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user