2017-10-28 16:48:41 +05:30
|
|
|
# Tox (https://tox.readthedocs.io/) is a tool for running tests
|
2012-06-28 12:43:12 -07:00
|
|
|
# in multiple virtualenvs. This configuration file will run the
|
|
|
|
# test suite on all supported python versions. To use it, "pip install tox"
|
|
|
|
# and then run "tox" from this directory.
|
|
|
|
|
|
|
|
[tox]
|
2020-05-06 11:15:02 +02:00
|
|
|
envlist = security,flake8,py
|
2019-11-20 07:57:09 +01:00
|
|
|
minversion = 1.7.0
|
2012-06-28 12:43:12 -07:00
|
|
|
|
|
|
|
[testenv]
|
2013-07-09 00:26:59 +06:00
|
|
|
deps =
|
2018-05-17 08:53:42 +00:00
|
|
|
-ctests/constraints.txt
|
2019-10-31 14:46:02 +05:00
|
|
|
-rtests/requirements-py3.txt
|
2013-11-07 04:02:46 -02:00
|
|
|
# Extras
|
2020-05-15 22:50:54 +03:00
|
|
|
boto3>=1.13.0
|
2020-08-11 12:52:54 +02:00
|
|
|
botocore>=1.4.87
|
2020-08-22 04:33:35 -03:00
|
|
|
Pillow>=4.0.0
|
2016-02-15 16:20:13 +03:00
|
|
|
passenv =
|
2016-02-15 17:50:47 +03:00
|
|
|
S3_TEST_FILE_URI
|
2016-02-15 16:20:13 +03:00
|
|
|
AWS_ACCESS_KEY_ID
|
|
|
|
AWS_SECRET_ACCESS_KEY
|
2017-09-13 16:24:04 +09:00
|
|
|
GCS_TEST_FILE_URI
|
|
|
|
GCS_PROJECT_ID
|
2020-10-02 01:05:45 +07:00
|
|
|
#allow tox virtualenv to upgrade pip/wheel/setuptools
|
|
|
|
download = true
|
2012-06-28 12:43:12 -07:00
|
|
|
commands =
|
2019-11-14 15:42:34 +01:00
|
|
|
py.test --cov=scrapy --cov-report= {posargs:--durations=10 docs scrapy tests}
|
2020-09-29 00:27:39 +07:00
|
|
|
install_command =
|
|
|
|
pip install --use-feature=2020-resolver {opts} {packages}
|
2013-07-09 00:26:59 +06:00
|
|
|
|
2020-06-18 13:52:04 -03:00
|
|
|
[testenv:typing]
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
mypy==0.780
|
|
|
|
commands =
|
|
|
|
mypy {posargs: scrapy tests}
|
|
|
|
|
2019-11-20 07:57:09 +01:00
|
|
|
[testenv:security]
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
bandit
|
|
|
|
commands =
|
|
|
|
bandit -r -c .bandit.yml {posargs:scrapy}
|
2013-11-19 20:15:15 -02:00
|
|
|
|
2019-11-20 07:57:09 +01:00
|
|
|
[testenv:flake8]
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
|
|
|
pytest-flake8
|
|
|
|
commands =
|
|
|
|
py.test --flake8 {posargs:docs scrapy tests}
|
2020-06-14 06:45:27 -03:00
|
|
|
|
2019-12-18 15:43:40 +01:00
|
|
|
[testenv:pylint]
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
|
|
|
# Optional dependencies
|
|
|
|
boto
|
|
|
|
reppy
|
|
|
|
robotexclusionrulesparser
|
|
|
|
# Test dependencies
|
|
|
|
pylint
|
|
|
|
commands =
|
|
|
|
pylint conftest.py docs extras scrapy setup.py tests
|
2019-11-20 07:57:09 +01:00
|
|
|
|
2020-07-02 20:10:08 +02:00
|
|
|
[pinned]
|
2019-08-07 04:36:52 -03:00
|
|
|
deps =
|
|
|
|
-ctests/constraints.txt
|
2020-10-01 19:59:23 +07:00
|
|
|
#using cryptography-2.3.1 to solve dependencies conflict on pip20.2>=
|
|
|
|
cryptography==2.3.1
|
2019-08-07 04:36:52 -03:00
|
|
|
cssselect==0.9.1
|
2020-06-14 06:45:27 -03:00
|
|
|
itemadapter==0.1.0
|
2019-08-07 04:36:52 -03:00
|
|
|
parsel==1.5.0
|
2019-09-09 08:12:32 +00:00
|
|
|
Protego==0.1.15
|
2020-10-07 11:26:53 +07:00
|
|
|
!pypy3: PyDispatcher==2.0.5
|
2020-10-01 15:47:19 +07:00
|
|
|
#using pyOpenSSL<18.1 to solve dependencies conflict with mitmproxy on pip20.2>=
|
|
|
|
pyOpenSSL==18.0.0
|
2019-08-07 04:36:52 -03:00
|
|
|
queuelib==1.4.2
|
|
|
|
service_identity==16.0.0
|
2020-10-06 19:44:48 +07:00
|
|
|
Twisted==20.3.0
|
2019-08-07 04:36:52 -03:00
|
|
|
w3lib==1.17.0
|
2020-10-07 11:26:53 +07:00
|
|
|
#zope.interface==5.1.2 to resolve conflict with Twisted==20.3.0
|
2020-10-06 19:51:42 +07:00
|
|
|
zope.interface==5.1.2
|
2019-08-07 04:36:52 -03:00
|
|
|
-rtests/requirements-py3.txt
|
|
|
|
# Extras
|
2020-08-11 12:52:54 +02:00
|
|
|
botocore==1.4.87
|
2020-06-19 21:41:15 -03:00
|
|
|
google-cloud-storage==1.29.0
|
2020-08-22 04:33:35 -03:00
|
|
|
Pillow==4.0.0
|
2016-01-13 12:47:42 +01:00
|
|
|
|
2020-07-02 20:10:08 +02:00
|
|
|
[testenv:pinned]
|
|
|
|
deps =
|
|
|
|
{[pinned]deps}
|
2020-10-07 11:26:53 +07:00
|
|
|
lxml==3.5.0
|
|
|
|
|
2020-07-02 20:10:08 +02:00
|
|
|
[testenv:windows-pinned]
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
{[pinned]deps}
|
2020-08-27 12:43:43 +02:00
|
|
|
# First lxml version that includes a Windows wheel for Python 3.6, so we do
|
2020-07-02 20:10:08 +02:00
|
|
|
# not need to build lxml from sources in a CI Windows job:
|
|
|
|
lxml==3.8.0
|
|
|
|
|
2019-11-20 07:57:09 +01:00
|
|
|
[testenv:extra-deps]
|
2019-11-07 14:05:01 +01:00
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
2019-11-20 07:57:09 +01:00
|
|
|
reppy
|
|
|
|
robotexclusionrulesparser
|
2019-11-07 14:05:01 +01:00
|
|
|
|
2020-07-16 23:19:24 +02:00
|
|
|
[testenv:asyncio]
|
|
|
|
commands =
|
|
|
|
{[testenv]commands} --reactor=asyncio
|
|
|
|
|
|
|
|
[testenv:asyncio-pinned]
|
2020-10-07 11:26:53 +07:00
|
|
|
deps = {[testenv:pinned]deps}
|
2020-07-16 23:19:24 +02:00
|
|
|
commands = {[testenv:asyncio]commands}
|
|
|
|
|
|
|
|
[testenv:pypy3]
|
|
|
|
basepython = pypy3
|
2020-10-06 19:44:48 +07:00
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
2020-10-07 01:10:01 +07:00
|
|
|
lxml==4.0.0
|
2020-07-16 23:19:24 +02:00
|
|
|
commands =
|
|
|
|
py.test {posargs:--durations=10 docs scrapy tests}
|
|
|
|
|
|
|
|
[testenv:pypy3-pinned]
|
|
|
|
basepython = {[testenv:pypy3]basepython}
|
|
|
|
deps =
|
|
|
|
{[pinned]deps}
|
|
|
|
lxml==4.0.0
|
2020-10-07 11:26:53 +07:00
|
|
|
PyPyDispatcher==2.1.0
|
|
|
|
commands = {[testenv:pypy3]commands}
|
2020-07-16 23:19:24 +02:00
|
|
|
|
2015-05-14 20:41:55 -03:00
|
|
|
[docs]
|
2014-04-09 18:46:01 -03:00
|
|
|
changedir = docs
|
|
|
|
deps =
|
2017-03-20 22:21:08 +05:30
|
|
|
-rdocs/requirements.txt
|
2020-04-16 14:48:38 +02:00
|
|
|
setenv =
|
|
|
|
READTHEDOCS_PROJECT=scrapy
|
|
|
|
READTHEDOCS_VERSION=master
|
2015-05-14 20:41:55 -03:00
|
|
|
|
|
|
|
[testenv:docs]
|
2019-12-18 15:50:49 +01:00
|
|
|
basepython = python3
|
2015-05-14 20:41:55 -03:00
|
|
|
changedir = {[docs]changedir}
|
|
|
|
deps = {[docs]deps}
|
2020-04-16 14:48:38 +02:00
|
|
|
setenv = {[docs]setenv}
|
2014-04-09 18:46:01 -03:00
|
|
|
commands =
|
2015-05-14 20:40:12 -03:00
|
|
|
sphinx-build -W -b html . {envtmpdir}/html
|
2015-05-14 20:41:55 -03:00
|
|
|
|
2019-01-04 18:17:35 +01:00
|
|
|
[testenv:docs-coverage]
|
2019-12-18 15:50:49 +01:00
|
|
|
basepython = python3
|
2019-01-04 18:17:35 +01:00
|
|
|
changedir = {[docs]changedir}
|
|
|
|
deps = {[docs]deps}
|
2020-04-16 14:48:38 +02:00
|
|
|
setenv = {[docs]setenv}
|
2019-01-04 18:17:35 +01:00
|
|
|
commands =
|
|
|
|
sphinx-build -b coverage . {envtmpdir}/coverage
|
|
|
|
|
2015-05-14 20:41:55 -03:00
|
|
|
[testenv:docs-links]
|
2019-12-18 15:50:49 +01:00
|
|
|
basepython = python3
|
2015-05-14 20:41:55 -03:00
|
|
|
changedir = {[docs]changedir}
|
|
|
|
deps = {[docs]deps}
|
2020-04-16 14:48:38 +02:00
|
|
|
setenv = {[docs]setenv}
|
2015-05-14 20:41:55 -03:00
|
|
|
commands =
|
2015-05-14 20:40:12 -03:00
|
|
|
sphinx-build -W -b linkcheck . {envtmpdir}/linkcheck
|