I got some of our project packages installed in a venvjenkins job. After installation, the task pulls some unittests from a separate repository and runs them against the installed package.
My problem coveragecovers only test scripts, but not installed packages.
Here is the folder structure:
JenkinsWorkspace
|_Venv
|_MyProject
|_trunk
|_Python
|_Package1
|_Package2
|_temp_tests
|_test_suite1.py
|_...
So, for further explanation, I iterate over the packages in MyProject, check the tests for each in temp_tests, cdin temp_testsand callnose2 -t ..\..\..\Venv\Lib\site-packages
, -t . , . coverage .
?
my unittest.cfg:
[coverage]
coverage-report = term-missing
always-on = True
coverage-config = .coveragerc
[junit-xml]
always-on = True
keep_restricted = False
path = nose2-junit.xml
test_fullname = False
.coveragerc:
[run]
branch = True
[report]
show_missing = True
omit =
build/*
tests/*
setup.py
*/__init__.py