File: run_coverage.bat

package info (click to toggle)
datalab 0.18.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 41,724 kB
  • sloc: python: 27,814; makefile: 7
file content (30 lines) | stat: -rw-r--r-- 992 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
23
24
25
26
27
28
29
30
@echo off
REM This script was derived from PythonQwt project
REM ======================================================
REM Run coverage code analysis tool
REM ======================================================
REM Licensed under the terms of the MIT License
REM Copyright (c) 2020 Pierre Raybaut
REM (see PythonQwt LICENSE file for more details)
REM ======================================================
setlocal
call %~dp0utils GetScriptPath SCRIPTPATH
call %FUNC% GetLibName LIBNAME
call %FUNC% GetModName MODNAME
call %FUNC% SetPythonPath
call %FUNC% UsePython

@REM Running DataLab tests
if exist sitecustomize.py ( del /q sitecustomize.py )
echo import coverage> sitecustomize.py
echo coverage.process_startup()>> sitecustomize.py
set COVERAGE_PROCESS_START=%SCRIPTPATH%\..\.coveragerc
coverage run -m pytest %*
if exist sitecustomize.py ( del /q sitecustomize.py )

@REM Generating coverage report
coverage combine
coverage html
start .\htmlcov\index.html

call %FUNC% EndOfScript