diff --git a/.travis.yml b/.travis.yml index 836a028c..595d1663 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,12 +32,16 @@ install: # PyTest - pip install -U pytest + # Tox + - pip install -U tox + # others - pip install coveralls --use-wheel script: - python setup.py develop - catchsegv xvfb-run coverage run --source=pytestqt setup.py test + - tox -e lint after_success: - coveralls diff --git a/README.rst b/README.rst index 6b968eca..e4fec66c 100644 --- a/README.rst +++ b/README.rst @@ -82,9 +82,10 @@ this order: To force a particular API, set the configuration variable ``qt_api`` in your ``pytest.ini`` file to ``pyqt5``, ``pyside``, ``pyqt4`` or ``pyqt4v2``. ``pyqt4v2`` sets the ``PyQt4`` -API to `version 2 `_. +API to `version 2`_. .. code-block:: ini + [pytest] qt_api=pyqt5 @@ -93,7 +94,7 @@ Alternatively, you can set the ``PYTEST_QT_API`` environment variable to the same values described above (the environment variable wins over the configuration if both are set). -.. _version2: http://pyqt.sourceforge.net/Docs/PyQt4/incompatible_apis.html +.. _version 2: http://pyqt.sourceforge.net/Docs/PyQt4/incompatible_apis.html Documentation diff --git a/appveyor.yml b/appveyor.yml index fddf248f..400ae94c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,7 +12,7 @@ environment: - INSTALL_QT: "py27-pyqt4" TESTENVS: "py27-pyqt4" - - TESTENVS: "py27-pyside,py34-pyside,docs" + - TESTENVS: "py27-pyside,py34-pyside,lint" install: - C:\Python27\python -u scripts\install-qt.py diff --git a/tox.ini b/tox.ini index 17e7f70f..d530cb7e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] # note that tox expects interpreters to be found at C:\PythonXY, # with XY being python version ("27" or "34") for instance -envlist = py{27,34}-pyqt4, py{34,35}-pyqt5, py{27,34,35}-pyside, docs +envlist = py{27,34}-pyqt4, py{34,35}-pyqt5, py{27,34,35}-pyside, lint [testenv] deps=pytest @@ -19,13 +19,17 @@ setenv= pyqt5: QT_QPA_PLATFORM_PLUGIN_PATH={envdir}/Lib/site-packages/PyQt5/plugins/platforms passenv=DISPLAY XAUTHORITY USER USERNAME -[testenv:docs] +[testenv:lint] basepython=python2.7 -deps=pytest +deps= + pytest sphinx sphinx_rtd_theme + restructuredtext_lint changedir=docs setenv= READTHEDOCS=True -commands=sphinx-build -q -E -W -b html . _build +commands= + rst-lint {toxinidir}/CHANGELOG.rst {toxinidir}/README.rst + sphinx-build -q -E -W -b html . _build