aboutsummaryrefslogtreecommitdiffstats
path: root/tox.ini
blob: e284c4ad9f898dcb8061559a973982398b14096b (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# ============================================================================
# TOX CONFIGURATION: parse_type
# ============================================================================
# DESCRIPTION:
#
#   Use tox to run tasks (tests, ...) in a clean virtual environment.
#   Tox is configured by default for online usage.
#
#   Run tox, like:
#
#       tox -e py27
#       tox -e py37
#
# SEE ALSO:
#   * https://tox.readthedocs.io/en/latest/config.html
# ============================================================================
# -- ONLINE USAGE:
# PIP_INDEX_URL = https://pypi.org/simple

[tox]
minversion = 3.10.0
envlist    = py27, py37, py38, pypy, pypy3, doctest
skip_missing_interpreters = True
sitepackages = False
indexserver =
    default = https://pypi.org/simple


# -----------------------------------------------------------------------------
# TEST ENVIRONMENTS:
# -----------------------------------------------------------------------------
# install_command = pip install -U {opts} {packages}
[testenv]
changedir = {toxinidir}
commands =
    pytest {posargs:tests}
deps =
    pytest <  5.0; python_version <  '3.0'  # >= 4.2
    pytest >= 5.0; python_version >= '3.0'
    pytest-html >= 1.19.0
setenv =
    TOXRUN = yes
    PYSETUP_BOOTSTRAP = no


[testenv:doctest]
commands =
    pytest --doctest-modules -v parse_type


# -----------------------------------------------------------------------------
# MORE TEST ENVIRONMENTS:
# -----------------------------------------------------------------------------
[testenv:coverage]
commands =
    pytest --cov=parse_type {posargs:tests}
    coverage combine
    coverage html
    coverage xml
deps =
    {[testenv]deps}
    pytest-cov
    coverage>=4.0

[testenv:install]
changedir = {envdir}
commands =
    python ../../setup.py install -q
    {toxinidir}/bin/toxcmd.py copytree ../../tests .
    pytest {posargs:tests}
deps =
    pytest>=3.2


# -----------------------------------------------------------------------------
# SELDOM USED TEST ENVIRONMENTS:
# -----------------------------------------------------------------------------
# -- ENSURE: README.rst is well-formed.
# python setup.py --long-description | rst2html.py >output.html
; [testenv:check_setup]
; changedir = {toxinidir}
; commands=
;     python setup.py --long-description > output.tmp
;     rst2html.py output.tmp output.html
; deps =
;     docutils