File: coverage.sh

package info (click to toggle)
cambalache 1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,212 kB
  • sloc: python: 19,742; xml: 13,309; sql: 422; makefile: 212; ansic: 158; sh: 11
file content (16 lines) | stat: -rwxr-xr-x 413 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

SCRIPT=$(readlink -f $0)
DIRNAME=$(dirname $SCRIPT)

export COVERAGE_PROCESS_START=$DIRNAME/pyproject.toml

#Run tests with coverage if available
if command -v python3-coverage &> /dev/null
then
  python3-coverage run --rcfile=$DIRNAME/pyproject.toml -m pytest $@
  python3-coverage combine
  python3-coverage report -m
else
  echo "python3-coverage not found;\n sudo apt install python3-coverage"
fi