qutebrowser/tox.ini

197 lines
5.4 KiB
INI
Raw Normal View History

# Tox (http://tox.testrun.org/) is a tool for running tests
# 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]
2015-10-06 06:44:45 +02:00
envlist = py34,py35,misc,vulture,pep257,pyflakes,pep8,mccabe,pylint,pyroma,check-manifest
[testenv]
# https://bitbucket.org/hpk42/tox/issue/246/ - only needed for Windows though
2015-08-07 06:38:12 +02:00
setenv =
QT_QPA_PLATFORM_PLUGIN_PATH={envdir}/Lib/site-packages/PyQt5/plugins/platforms
PYTEST_QT_API=pyqt5
passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER CI
2015-03-30 22:09:56 +02:00
deps =
-r{toxinidir}/requirements.txt
wheel==0.26.0
py==1.4.30
pytest==2.7.3 # rq.filter: <2.8.0
pytest-capturelog==0.7
pytest-qt==1.7.0
pytest-mock==0.8.1
pytest-html==1.6
pytest-faulthandler==1.0.1
pytest-sugar==0.4.0
2015-10-07 16:54:46 +02:00
xvfbwrapper==0.2.5
hypothesis==1.11.4
tox: Update coverage.py to 4.0.0. Changelog: Backward incompatibilities: - Python versions supported are now: - CPython 2.6, 2.7, 3.3, 3.4 and 3.5 - PyPy2 2.4, 2.6 - PyPy3 2.4 - The original command line switches (-x to run a program, etc) are no longer supported. - The COVERAGE_OPTIONS environment variable is no longer supported. It was a hack for --timid before configuration files were available. - The original module-level function interface to coverage.py is no longer supported. You must now create a coverage.Coverage object, and use methods on it. - The Coverage.use_cache method is no longer supported. - The private method Coverage._harvest_data is now called Coverage.get_data(), and returns the CoverageData containing the collected data. - Coverage.py is now licensed under the Apache 2.0 license. See NOTICE.txt for details. - Coverage.py kits no longer include tests and docs. If you were using them, get in touch and let me know how. Major new features: - Plugins: third parties can write plugins to add file support for non-Python files, such as web application templating engines, or languages that compile down to Python. See Plugins for how to use plugins, and Plugin classes for details of how to write them. A plugin for measuring Django template coverage is available: django_coverage_plugin - Gevent, eventlet, and greenlet are now supported. The [run] concurrency setting, or the --concurrency command line switch, specifies the concurrency library in use. Huge thanks to Peter Portante for initial implementation, and to Joe Jevnik for the final insight that completed the work. - The data storage has been re-written, using JSON instead of pickle. The CoverageData class is a new supported API to the contents of the data file. Data files from older versions of coverage.py can be converted to the new format with python -m coverage.pickle2json. - Wildly experimental: support for measuring processes started by the multiprocessing module. To use, set --concurrency=multiprocessing, either on the command line or in the .coveragerc file. Thanks, Eduardo Schettino. Currently, this does not work on Windows. New features: - Options are now also read from a setup.cfg file, if any. Sections are prefixed with “coverage:”, so the [run] options will be read from the [coverage:run] section of setup.cfg. - The HTML report now has filtering. Type text into the Filter box on the index page, and only modules with that text in the name will be shown. Thanks, Danny Allen. - A new option: coverage report --skip-covered (or [report] skip_covered) will reduce the number of files reported by skipping files with 100% coverage. Thanks, Krystian Kichewko. This means that empty __init__.py files will be skipped, since they are 100% covered. - You can now specify the --fail-under option in the .coveragerc file as the [report] fail_under option. - The report -m command now shows missing branches when reporting on branch coverage. Thanks, Steve Leonard. - The coverage combine command now accepts any number of directories or files as arguments, and will combine all the data from them. This means you don’t have to copy the files to one directory before combining. Thanks, Christine Lytwynec. - A new configuration option for the XML report: [xml] package_depth controls which directories are identified as packages in the report. Directories deeper than this depth are not reported as packages. The default is that all directories are reported as packages. Thanks, Lex Berezhny. - A new configuration option, [run] note, lets you set a note that will be stored in the runs section of the data file. You can use this to annotate the data file with any information you like. - The COVERAGE_DEBUG environment variable can be used to set the [run] debug configuration option to control what internal operations are logged. - A new version identifier is available, coverage.version_info, a plain tuple of values similar to sys.version_info. Improvements: - Coverage.py now always adds the current directory to sys.path, so that plugins can import files in the current directory. - Coverage.py now accepts a directory name for coverage run and will run a __main__.py found there, just like Python will. Thanks, Dmitry Trofimov. - The --debug switch can now be used on any command. - Reports now use file names with extensions. Previously, a report would describe a/b/c.py as “a/b/c”. Now it is shown as “a/b/c.py”. This allows for better support of non-Python files. - Missing branches in the HTML report now have a bit more information in the right-hand annotations. Hopefully this will make their meaning clearer. - The XML report now contains a <source> element. Thanks Stan Hu. - The XML report now includes a missing-branches attribute. Thanks, Steve Peak. This is not a part of the Cobertura DTD, so the XML report no longer references the DTD. - The XML report now reports each directory as a package again. This was a bad regression, I apologize. - In parallel mode, coverage erase will now delete all of the data files. - A new warning is possible, if a desired file isn’t measured because it was imported before coverage.py was started. - The coverage.process_startup() function now will start coverage measurement only once, no matter how many times it is called. This fixes problems due to unusual virtualenv configurations. - Unrecognized configuration options will now print an error message and stop coverage.py. This should help prevent configuration mistakes from passing silently. API changes: - The class defined in the coverage module is now called Coverage instead of coverage, though the old name still works, for backward compatibility. - You can now programmatically adjust the configuration of coverage.py by calling Coverage.set_option() after construction. Coverage.get_option() reads the configuration values. - If the config_file argument to the Coverage constructor is specified as ”.coveragerc”, it is treated as if it were True. This means setup.cfg is also examined, and a missing file is not considered an error. Bug fixes: - The textual report and the HTML report used to report partial branches differently for no good reason. Now the text report’s “missing branches” column is a “partial branches” column so that both reports show the same numbers. This closes issue 342. - The fail-under value is now rounded the same as reported results, preventing paradoxical results, fixing issue 284. - Branch coverage couldn’t properly handle certain extremely long files. This is now fixed, closing issue 359. - Branch coverage didn’t understand yield statements properly. Mickie Betz persisted in pursuing this despite Ned’s pessimism. Fixes issue 308 and issue 324. - Files with incorrect encoding declaration comments are no longer ignored by the reporting commands. - Empty files are now reported as 100% covered in the XML report, not 0% covered. - The XML report will now create the output directory if need be. Thanks, Chris Rose. - HTML reports no longer raise UnicodeDecodeError if a Python file has undecodable characters. - The annotate command will now annotate all files, not just ones relative to the current directory.
2015-09-21 07:16:37 +02:00
coverage==4.0.0
pytest-cov==2.2.0
beautifulsoup4==4.4.1
httpbin==0.3.0
itsdangerous==0.24
Werkzeug==0.10.4
commands =
{envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} -m py.test --strict -rfEsw --cov qutebrowser --cov-report xml --cov-report=html --cov-report= {posargs:tests}
{envpython} scripts/dev/check_coverage.py {posargs}
[testenv:mkvenv]
basepython = python3
commands = {envpython} scripts/link_pyqt.py --tox {envdir}
envdir = {toxinidir}/.venv
usedevelop = true
2015-03-26 09:18:21 +01:00
[testenv:unittests-frozen]
basepython = python3
passenv = {[testenv]passenv}
skip_install = true
deps =
{[testenv]deps}
cx_Freeze==4.3.4
commands =
{envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} scripts/dev/freeze_tests.py build_exe -b {envdir}/build
{envdir}/build/run-frozen-tests --strict -rfEsw {posargs}
2015-09-28 21:55:35 +02:00
[testenv:unittests-nodisp]
basepython = python3
passenv = {[testenv]passenv}
deps = {[testenv]deps}
setenv =
DISPLAY=
QUTE_NO_DISPLAY_OK=1
2015-09-28 21:55:35 +02:00
commands =
{envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} -m py.test --strict -rfEw {posargs:tests}
2015-09-28 21:55:35 +02:00
[testenv:misc]
basepython = python3
# For global .gitignore files
passenv = HOME
2015-10-05 23:27:19 +02:00
deps =
commands =
{envpython} scripts/dev/misc_checks.py git
{envpython} scripts/dev/misc_checks.py vcs
{envpython} scripts/dev/misc_checks.py spelling
2015-10-05 23:27:19 +02:00
[testenv:vulture]
basepython = python3
deps = vulture==0.8.1
commands =
{envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} scripts/dev/run_vulture.py
[testenv:pylint]
basepython = python3.4
skip_install = true
setenv = PYTHONPATH={toxinidir}/scripts/dev
passenv =
deps =
{[testenv]deps}
2015-10-05 06:53:56 +02:00
{[testenv:misc]deps}
astroid==1.3.8
pylint==1.4.4
logilab-common==1.0.2
six==1.10.0
2015-10-06 06:10:32 +02:00
vulture==0.8.1
commands =
{envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} -m pylint scripts qutebrowser --rcfile=.pylintrc --output-format=colorized --reports=no --expected-line-ending-format=LF
{envpython} scripts/dev/run_pylint_on_tests.py --rcfile=.pylintrc --output-format=colorized --reports=no --expected-line-ending-format=LF
[testenv:pep257]
basepython = python3
skip_install = true
2015-06-10 18:33:15 +02:00
passenv = PYTHON LANG
deps = pep257==0.6.0
# Disabled checks:
2015-07-21 10:26:57 +02:00
# D102: Missing docstring in public method (will be handled by others)
# D103: Missing docstring in public function (will be handled by others)
# D209: Blank line before closing """ (removed from PEP257)
# D402: First line should not be function's signature (false-positives)
2015-08-02 22:15:35 +02:00
commands = {envpython} -m pep257 scripts tests qutebrowser --ignore=D102,D103,D209,D402 '--match=(?!resources|test_*).*\.py'
[testenv:pyflakes]
basepython = python3
# https://github.com/fschulze/pytest-flakes/issues/6
setenv = LANG=en_US.UTF-8
passenv =
deps =
-r{toxinidir}/requirements.txt
2015-06-26 22:41:30 +02:00
py==1.4.30
2015-10-07 18:14:35 +02:00
pytest==2.8.2
pyflakes==1.0.0
pytest-flakes==1.0.1
commands =
{envpython} -m py.test -q --flakes --ignore=tests --noconftest
[testenv:pep8]
basepython = python3
passenv =
deps =
-r{toxinidir}/requirements.txt
2015-06-26 22:41:30 +02:00
py==1.4.30
2015-10-07 18:14:35 +02:00
pytest==2.8.2
pep8==1.6.2
pytest-pep8==1.0.6
commands =
{envpython} -m py.test -q --pep8 --ignore=tests --noconftest
[testenv:mccabe]
basepython = python3
passenv =
deps =
-r{toxinidir}/requirements.txt
2015-06-26 22:41:30 +02:00
py==1.4.30
2015-10-07 18:14:35 +02:00
pytest==2.8.2
mccabe==0.3.1
pytest-mccabe==0.1
commands =
{envpython} -m py.test -q --mccabe --ignore=tests --noconftest
[testenv:pyroma]
basepython = python3
skip_install = true
passenv =
deps =
pyroma==1.8.2
docutils==0.12
commands =
{envdir}/bin/pyroma .
[testenv:check-manifest]
basepython = python3
skip_install = true
passenv =
deps =
check-manifest==0.25
commands =
{envdir}/bin/check-manifest --ignore 'qutebrowser/git-commit-id,qutebrowser/html/doc,qutebrowser/html/doc/*,*/__pycache__'
2015-03-26 09:18:21 +01:00
[testenv:docs]
basepython = python3
skip_install = true
whitelist_externals = git
passenv =
2015-03-26 09:18:21 +01:00
deps =
-r{toxinidir}/requirements.txt
2015-03-26 09:18:21 +01:00
commands =
{envpython} scripts/link_pyqt.py --tox {envdir}
2015-06-28 23:04:18 +02:00
{envpython} scripts/dev/src2asciidoc.py
git --no-pager diff --exit-code --stat
2015-03-26 09:18:21 +01:00
{envpython} scripts/asciidoc2html.py {posargs}
[testenv:cxfreeze-windows]
# PYTHON is actually required when using this env, but the entire tox.ini would
# fail if we didn't have a fallback defined.
basepython = {env:PYTHON:}/python.exe
skip_install = true
deps =
-r{toxinidir}/requirements.txt
cx_Freeze==4.3.4
commands =
{envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} scripts/dev/freeze.py {posargs}