Skip to content

Commit 321b6dc

Browse files
authored
Merge pull request #320 from splunk/smoke-tests-coverage
Tox code coverage
2 parents 8bcebf7 + ff39852 commit 321b6dc

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.coveragerc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[run]
2+
omit =
3+
.tox/*
4+
tests/*

tox.ini

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py27,py37
2+
envlist = clean,py27,py37
33
skipsdist = {env:TOXBUILD:false}
44

55
[testenv:pep8]
@@ -28,12 +28,16 @@ setenv = SPLUNK_HOME=/opt/splunk
2828
INPUT_EXAMPLE_UPLOAD=/opt/splunk/var/log/splunk/splunkd_ui_access.log
2929
whitelist_externals = true
3030
deps = pytest
31+
pytest-cov
3132
xmlrunner
3233
unittest2
3334
unittest-xml-reporting
3435

3536
distdir = build
36-
#changedir = tests
37-
#commands_pre = python setup.py dist build
3837
commands =
39-
{env:TOXBUILD:python -m pytest --junitxml=test-reports/junit-{envname}.xml} {posargs}
38+
{env:TOXBUILD:python -m pytest --junitxml=test-reports/junit-{envname}.xml --cov --cov-config=.coveragerc} {posargs}
39+
40+
[testenv:clean]
41+
deps = coverage
42+
skip_install = true
43+
commands = coverage erase

0 commit comments

Comments
 (0)