File: run_local_tests.sh

package info (click to toggle)
python-btsocket 0.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 232 kB
  • sloc: python: 1,687; sh: 20; makefile: 6
file content (22 lines) | stat: -rwxr-xr-x 456 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

# Ensure Python virtual environment is loaded
. venv/bin/activate

pycodestyle -v btsocket
lint_btsocket=$?
pycodestyle -v examples
lint_examples=$?

coverage run -m unittest discover -v tests
tests_result=$?

coverage report
coverage html
echo file://`pwd`/htmlcov/index.html

if [ $((lint_btsocket + lint_examples + tests_result)) -ne 0 ]; then
   echo -e "\n\n###  A test has failed!!  ###\n"
else
    echo -e "\n\nSuccess!!!\n"
fi