mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
tests: Ignore tests using 'collect_ignore'
Per the pytest docs [1], this is the preferred way to ignore tests. This necessitates removing the 'test-async' target as it no longer makes any sense. [1] https://docs.pytest.org/en/latest/example/pythoncollection.html Signed-off-by: Stephen Finucane <stephen@that.guru>
This commit is contained in:
@@ -42,5 +42,5 @@ install:
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then python3.6 -m pip install mypy typed-ast; fi
|
||||
script:
|
||||
- flake8
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then make type-check test-async; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then make type-check test; fi
|
||||
- if [[ $TRAVIS_PYTHON_VERSION != '3.6' ]]; then make test; fi
|
||||
|
||||
4
Makefile
4
Makefile
@@ -69,11 +69,11 @@ reindent:
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
@cd tests; $(PYTHON) run.py --ignore py35 -v $(TEST)
|
||||
@cd tests; $(PYTHON) run.py -v $(TEST)
|
||||
|
||||
.PHONY: test-async
|
||||
test-async:
|
||||
@cd tests; $(PYTHON) run.py -v $(TEST)
|
||||
@echo "This target no longer does anything and will be removed imminently"
|
||||
|
||||
.PHONY: covertest
|
||||
covertest:
|
||||
|
||||
@@ -8,12 +8,17 @@
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
from sphinx.testing.path import path
|
||||
|
||||
pytest_plugins = 'sphinx.testing.fixtures'
|
||||
|
||||
# Disable Python version-specific
|
||||
if sys.version_info < (3, 5):
|
||||
collect_ignore = ['py35']
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def rootdir():
|
||||
|
||||
15
tox.ini
15
tox.ini
@@ -1,6 +1,6 @@
|
||||
[tox]
|
||||
minversion=2.0
|
||||
envlist=flake8,mypy,py{27,34,35,36},pypy,du{11,12,13,14}
|
||||
envlist=docs,flake8,mypy,py{27,34,35,36},pypy,du{11,12,13,14}
|
||||
|
||||
[testenv]
|
||||
passenv = https_proxy http_proxy no_proxy
|
||||
@@ -13,9 +13,7 @@ deps =
|
||||
setenv =
|
||||
SPHINX_TEST_TEMPDIR = {envdir}/testbuild
|
||||
commands=
|
||||
{envpython} -Wall tests/run.py --ignore tests/py35 --cov=sphinx \
|
||||
--durations 25 {posargs}
|
||||
sphinx-build -q -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html
|
||||
{envpython} -Wall tests/run.py --cov sphinx --durations 25 {posargs}
|
||||
|
||||
[testenv:du11]
|
||||
deps=
|
||||
@@ -47,15 +45,6 @@ deps=
|
||||
commands=
|
||||
pylint --rcfile utils/pylintrc sphinx
|
||||
|
||||
[testenv:py27]
|
||||
deps=
|
||||
{[testenv]deps}
|
||||
|
||||
[testenv:py35]
|
||||
commands=
|
||||
{envpython} -Wall tests/run.py --cov=sphinx --durations 25 {posargs}
|
||||
sphinx-build -q -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html
|
||||
|
||||
[testenv:mypy]
|
||||
basepython=python3
|
||||
deps=
|
||||
|
||||
Reference in New Issue
Block a user