Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dist: trusty
python:
- "2.7"
- "3.4"
- "3.5"

virtualenv:
system_site_packages: true
Expand All @@ -13,6 +14,14 @@ matrix:
exclude:
- env: PYTEST_QT_API=pyqt5
python: "2.7"
- env: PYTEST_QT_API=pyqt5
python: "3.4"
- env: PYTEST_QT_API=pyqt4
python: "3.5"
- env: PYTEST_QT_API=pyqt4v2
python: "3.5"
- env: PYTEST_QT_API=pyside
python: "3.5"

env:
- PYTEST_QT_API=pyqt4
Expand Down
15 changes: 8 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,16 @@ fixed, and make sure to include yourself in the contributors list. :)
Running tests
-------------

Tests are run using `tox`_. The simplest way to test is with `PySide`_, as it
is available on pip and can be installed by ``tox`` automatically::
Tests are run using `tox`_. The simplest way to test is with `PySide`_ or Python
3.5 with PyQt5, as they are available on pip and can be installed by ``tox``
automatically::

$ tox -e py34-pyside,py27-pyside,docs
$ tox -e py35-pyqt5,py34-pyside,py27-pyside,docs

If you want to test against `PyQt`_, install it into your global python
installation and use the ``py27-pyqt4``, ``py34-pyqt4`` or ``py34-pyqt5``
testing environments, and ``tox`` will copy the appropriate files into
its virtual environments to ensure isolation.
If you want to test against other `PyQt`_ combinations, install it into your
global python installation and use the ``py27-pyqt4``, ``py34-pyqt4`` or
``py34-pyqt5`` testing environments, and ``tox`` will copy the appropriate files
into its virtual environments to ensure isolation.

Contributors
------------
Expand Down
3 changes: 0 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
environment:
matrix:
- INSTALL_QT: "py34-pyqt5"
TESTENVS: "py34-pyqt5"

- INSTALL_QT: "py35-pyqt5"
TESTENVS: "py35-pyqt5"

Expand Down
4 changes: 2 additions & 2 deletions scripts/install-qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def fix_registry(python_ver):
else:
print('Skip install for this build')

elif 'TRAVIS' in os.environ:
elif 'TRAVIS' in os.environ and os.environ['PYTEST_QT_API'] != 'pyqt5':
def apt_get_install(packages):
print('Installing %s...' % ', '.join(packages))
subprocess.check_call(['sudo', 'apt-get', 'install', '-y', '-qq'] + packages)
Expand All @@ -85,4 +85,4 @@ def apt_get_install(packages):
apt_get_install([pkg])

else:
print('Nothing to do (not in Travis or AppVeyor)')
print('Nothing to do (PyQt5, or not on Travis/AppVeyor)')
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ envlist = py{27,34}-pyqt4, py{34,35}-pyqt5, py{27,34,35}-pyside, lint

[testenv]
deps=pytest
pyside: pyside
pyside: pyside
pyqt5: pyqt5
changedir=tests
commands=
pyqt5: {envpython} ../scripts/link_pyqt.py --tox {envdir} 5
pyqt4: {envpython} ../scripts/link_pyqt.py --tox {envdir} 4
{envpython} -m pytest {posargs}
setenv=
Expand Down