aboutsummaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini53
1 files changed, 42 insertions, 11 deletions
diff --git a/tox.ini b/tox.ini
index 6576991..86f9de6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,14 +1,45 @@
[tox]
-envlist =
- py27,
- py32,
- py33,
- py34,
- py35,
- py36,
- pypy,
- pypy3
+envlist = py27,
+ py33,
+ py34,
+ py35,
+ py36,
+ pypy,
+ pypy3,
+ coverage
+minversion = 2.7.0
+skip_missing_interpreters = true
[testenv]
-commands = pytest {posargs}
-deps = -rrequirements-dev.txt \ No newline at end of file
+description = run the unit tests with pytest under {basepython}
+setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname}
+passenv = DATEUTIL_MAY_CHANGE_TZ TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_*
+commands = python -m pytest {posargs: --cov-config="{toxinidir}/tox.ini" --cov=dateutil "{toxinidir}/dateutil/test"}
+deps = -rrequirements-dev.txt
+
+[testenv:coverage]
+description = combine coverage data and create reports
+deps = coverage
+skip_install = True
+changedir = {toxworkdir}
+setenv = COVERAGE_FILE=.coverage
+commands = coverage erase
+ coverage combine
+ coverage report
+ coverage xml
+
+[testenv:codecov]
+description = [only run on CI]: upload coverage data to codecov (depends on coverage running first)
+deps = codecov
+skip_install = True
+commands = codecov --file {toxworkdir}/coverage.xml
+
+[testenv:dev]
+description = DEV environment
+usedevelop = True
+commands = python -m pip list --format=columns
+ python -c 'import sys; print(sys.executable)'
+
+[coverage:run]
+source = dateutil
+omit = dateutil/test*