diff --git a/.travis.yml b/.travis.yml index c5ac1baa..de5eceaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ dist: trusty env: global: # used by ci-helpers - - CONDA_CHANNELS=conda-forge SETUP_XVFB=true DEPS="pytest tox coveralls" + - CONDA_CHANNELS=conda-forge SETUP_XVFB=true DEPS="pytest tox coveralls six" matrix: - PYTEST_QT_API=pyqt4 PYQT_PACKAGE="pyqt=4.*" PYTHON_VERSION=2.7 @@ -28,7 +28,7 @@ install: # Xvfb / window manager - sudo apt-get install -y xvfb herbstluftwm - # Setup miniconda + # Setup miniconda - git clone --depth 1 git://github.com/astropy/ci-helpers.git - CONDA_DEPENDENCIES="${DEPS} ${PYQT_PACKAGE}" source ci-helpers/travis/setup_conda.sh - source activate test && pip install -e . @@ -41,8 +41,8 @@ before_script: script: - source activate test && catchsegv coverage run --source=pytestqt -m pytest -v tests # for some reason tox doesn't get installed with a u+x flag - - | - chmod u+x /home/travis/miniconda/envs/test/bin/tox + - | + chmod u+x /home/travis/miniconda/envs/test/bin/tox /home/travis/miniconda/envs/test/bin/tox -e lint after_success: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4ea6da1c..b772c9ed 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,13 @@ +2.2.1 +----- + +- ``modeltester`` now accepts ``QBrush`` for ``BackgroundColorRole`` and ``TextColorRole`` (`#189`_). + Thanks `@p0las`_ for the PR. + +.. _#189: https://github.com/pytest-dev/pytest-qt/issues/189 +.. _@p0las: https://github.com/p0las + + 2.2.0 ----- diff --git a/pytestqt/modeltest.py b/pytestqt/modeltest.py index 27d93858..8c5b163f 100644 --- a/pytestqt/modeltest.py +++ b/pytestqt/modeltest.py @@ -448,8 +448,8 @@ def _test_data(self): (qt_api.QtCore.Qt.WhatsThisRole, str), (qt_api.QtCore.Qt.SizeHintRole, qt_api.QtCore.QSize), (qt_api.QtCore.Qt.FontRole, qt_api.QtGui.QFont), - (qt_api.QtCore.Qt.BackgroundColorRole, qt_api.QtGui.QColor), - (qt_api.QtCore.Qt.TextColorRole, qt_api.QtGui.QColor), + (qt_api.QtCore.Qt.BackgroundColorRole, (qt_api.QtGui.QColor, qt_api.QtGui.QBrush)), + (qt_api.QtCore.Qt.TextColorRole, (qt_api.QtGui.QColor, qt_api.QtGui.QBrush)), ] # General purpose roles with a fixed expected type