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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
|
[tox]
envlist = py{37,py37,38,py38,39,py39,310,311,312}-{brief,full,cover,nocover,niche,custom}
toxworkdir={env:TOX_WORK_DIR:.tox}
[testenv]
deps =
-r../requirements/test.txt
allowlist_externals =
bash
passenv=
HOME
LC_ALL
COVERAGE_FILE
TOXENV
# Allow CI builds (or user builds) to force coloured terminal output.
PY_COLORS
setenv=
brief: HYPOTHESIS_PROFILE=speedy
commands =
full: bash scripts/basic-test.sh
brief: python -bb -X dev -m pytest -n auto tests/cover/test_testdecorators.py {posargs}
cover: python -bb -X dev -m pytest -n auto tests/cover/ tests/pytest/ {posargs}
nocover: python -bb -X dev -m pytest -n auto tests/nocover/ {posargs}
niche: bash scripts/other-tests.sh
custom: python -bb -X dev -m pytest {posargs}
[testenv:py310-pyjion]
deps =
-r../requirements/test.txt
# We'd like to pin this, but pip-compile has to run under Python 3.10 (+)
# to do so and that's painful because other tools aren't compatible yet.
# If it's mid-2022, try again, starting by updating ci_version to 3.10
pyjion
commands =
# TODO: restore `-n auto` https://github.com/tonybaloney/Pyjion/issues/456
# TODO: re-enable in Actions main.yml once this actually works
pyjion -m pytest tests/cover tests/pytest tests/nocover
[testenv:quality]
deps=
-r../requirements/test.txt
commands=
python -bb -X dev -m pytest tests/quality/ -n auto
# Note: when adding or removing tested Pandas versions, make sure to update the
# docs in numpy.rst too. To see current download rates of each minor version:
# https://pepy.tech/project/pandas?versions=1.0.*&versions=1.1.*&versions=1.2.*&versions=1.3.*&versions=1.4.*&versions=1.5.*
[testenv:py39-pandas10]
deps =
-r../requirements/test.txt
pandas~=1.0.5
numpy~=1.23.5
commands =
python -bb -X dev -m pytest tests/pandas -n auto
[testenv:pandas11]
deps =
-r../requirements/test.txt
pandas~=1.1.5
commands =
python -bb -X dev -m pytest tests/pandas -n auto
[testenv:pandas12]
deps =
-r../requirements/test.txt
pandas~=1.2.5
commands =
python -bb -X dev -m pytest tests/pandas -n auto
[testenv:pandas13]
deps =
-r../requirements/test.txt
pandas~=1.3.5
commands =
python -bb -X dev -m pytest tests/pandas -n auto
[testenv:pandas14]
deps =
-r../requirements/test.txt
pandas~=1.4.3
commands =
python -bb -X dev -m pytest tests/pandas -n auto
[testenv:pandas15]
deps =
-r../requirements/test.txt
pandas~=1.5.0
commands =
python -bb -X dev -m pytest tests/pandas -n auto
# Adding a new pandas? See comment above!
[testenv:django32]
commands =
pip install .[pytz]
pip install django~=3.2.15
python -bb -X dev -m tests.django.manage test tests.django
[testenv:django40]
commands =
pip install django~=4.0.7
python -bb -X dev -m tests.django.manage test tests.django
[testenv:django41]
commands =
pip install django~=4.1.0
python -bb -X dev -m tests.django.manage test tests.django
[testenv:py{37,38,39}-nose]
deps =
nose
commands=
nosetests tests/cover/test_testdecorators.py
[testenv:py{37,38,39}-pytest46]
deps =
-r../requirements/test.txt
commands=
pip install pytest==4.6.11 pytest-xdist==1.34
python -bb -X dev -W'ignore:the imp module:DeprecationWarning' -m pytest tests/pytest tests/cover/test_testdecorators.py
[testenv:py{37,38,39}-pytest54]
deps =
-r../requirements/test.txt
commands=
pip install pytest==5.4.3 pytest-xdist
python -bb -X dev -m pytest tests/pytest tests/cover/test_testdecorators.py
[testenv:pytest62]
deps =
-r../requirements/test.txt
commands=
pip install pytest==6.2.5 pytest-xdist
python -bb -X dev -m pytest tests/pytest tests/cover/test_testdecorators.py
[testenv:pytest7]
deps =
-r../requirements/test.txt
commands=
pip install pytest==7.* pytest-xdist
python -bb -X dev -m pytest tests/pytest tests/cover/test_testdecorators.py
[testenv:coverage]
deps =
-r../requirements/coverage.txt
allowlist_externals =
rm
setenv=
PYTHONDEVMODE=1
HYPOTHESIS_INTERNAL_COVERAGE=true
commands_pre =
rm -f branch-check
pip install .[zoneinfo]
python -m coverage --version
python -m coverage debug sys
# Explicitly erase any old .coverage file so the report never sees it.
python -m coverage erase
# Produce a coverage report even if the test suite fails.
# (The tox task will still count as failed.)
ignore_errors = true
commands =
python -bb -X dev -m coverage run --rcfile=.coveragerc --source=hypothesis -m pytest -n0 --ff {posargs} \
tests/cover tests/conjecture tests/datetime tests/numpy tests/pandas tests/lark tests/redis tests/dpcontracts tests/codemods tests/typing_extensions
python -m coverage report -m --fail-under=100 --show-missing --skip-covered
python scripts/validate_branch_check.py
[testenv:conjecture-coverage]
deps =
-r../requirements/coverage.txt
setenv=
PYTHONDEVMODE=1
HYPOTHESIS_INTERNAL_COVERAGE=true
commands_pre =
python -m coverage erase
ignore_errors = true
commands =
python -bb -X dev -m coverage run --rcfile=.coveragerc --source=hypothesis.internal.conjecture -m pytest -n0 --strict-markers tests/conjecture
python -m coverage report -m --fail-under=100 --show-missing --skip-covered
[testenv:examples3]
deps=
-r../requirements/test.txt
commands=
python -m pip install --editable examples/example_hypothesis_entrypoint
python -bb -X dev -m pytest examples
|