Hello community, here is the log from the commit of package python-pytest-qt for openSUSE:Factory checked in at 2018-05-15 10:14:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pytest-qt (Old) and /work/SRC/openSUSE:Factory/.python-pytest-qt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-qt" Tue May 15 10:14:27 2018 rev:2 rq:606759 version:2.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pytest-qt/python-pytest-qt.changes 2017-08-30 16:22:16.569313892 +0200 +++ /work/SRC/openSUSE:Factory/.python-pytest-qt.new/python-pytest-qt.changes 2018-05-15 10:33:42.719505015 +0200 @@ -1,0 +2,29 @@ +Sun May 13 08:24:32 UTC 2018 - tchva...@suse.com + +- Enable tests +- Add patch skip-timeout-tests.patch to skip test randomly + failing in OBS + +------------------------------------------------------------------- +Sat May 12 16:24:16 UTC 2018 - a...@gmx.de + +- specfile: + * update copyright year + +- update to version 2.3.1: + * PYTEST_QT_API environment variable correctly wins over qt_api ini + variable if both are set at the same time (#196). Thanks @mochick + for the PR. + +- changes from version 2.3.0: + * New qapp_args fixture which can be used to pass custom arguments + to QApplication. Thanks @The-Compiler for the PR. + +- changes from version 2.2.1: + * modeltester now accepts QBrush for BackgroundColorRole and + TextColorRole (#189). Thanks @p0las for the PR. + +- changes from version 2.2.0: + * pytest-qt now supports PySide2 thanks to @rth! + +------------------------------------------------------------------- Old: ---- pytest-qt-2.1.2.tar.gz New: ---- pytest-qt-2.3.1.tar.gz skip-timeout-tests.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pytest-qt.spec ++++++ --- /var/tmp/diff_new_pack.PKk2di/_old 2018-05-15 10:33:43.495476516 +0200 +++ /var/tmp/diff_new_pack.PKk2di/_new 2018-05-15 10:33:43.495476516 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-pytest-qt # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,28 +17,26 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_with test Name: python-pytest-qt -Version: 2.1.2 +Version: 2.3.1 Release: 0 Summary: Pytest support for PyQt and PySide applications License: MIT Group: Development/Languages/Python -Url: http://github.com/pytest-dev/pytest-qt +URL: http://github.com/pytest-dev/pytest-qt Source: https://files.pythonhosted.org/packages/source/p/pytest-qt/pytest-qt-%{version}.tar.gz -BuildRequires: %{python_module devel} +Patch0: skip-timeout-tests.patch +BuildRequires: %{python_module pytest >= 2.7.0} +BuildRequires: %{python_module qt5} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} +BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: python-rpm-macros -%if %{with test} -BuildRequires: %{python_module pytest >= 2.7.0} -BuildRequires: %{python_module qt5} -%endif +BuildRequires: xvfb-run Requires: python-pytest >= 2.7.0 Requires: python-qt5 BuildArch: noarch - %python_subpackages %description @@ -51,7 +49,8 @@ %prep %setup -q -n pytest-qt-%{version} -sed -i 's/\r$//' LICENSE +%patch0 -p1 +dos2unix LICENSE %build %python_build @@ -60,15 +59,13 @@ %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if %{with test} %check export PYTEST_QT_API=pyqt5 -%python_exec -m pytest -v -%endif +%python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}" xvfb-run --server-args="-screen 0 1920x1080x24" py.test-%{py_ver} -v %files %{python_files} -%defattr(-,root,root,-) -%doc CHANGELOG.rst LICENSE README.rst +%license LICENSE +%doc CHANGELOG.rst README.rst %{python_sitelib}/* %changelog ++++++ pytest-qt-2.1.2.tar.gz -> pytest-qt-2.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/.pydevproject new/pytest-qt-2.3.1/.pydevproject --- old/pytest-qt-2.1.2/.pydevproject 2017-07-13 00:38:14.000000000 +0200 +++ new/pytest-qt-2.3.1/.pydevproject 2018-01-05 01:29:08.000000000 +0100 @@ -2,6 +2,7 @@ <?eclipse-pydev version="1.0"?><pydev_project> <pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH"> <path>/${PROJECT_DIR_NAME}</path> +<path>/${PROJECT_DIR_NAME}/tests</path> </pydev_pathproperty> <pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property> <pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/.travis.yml new/pytest-qt-2.3.1/.travis.yml --- old/pytest-qt-2.1.2/.travis.yml 2017-07-13 00:39:40.000000000 +0200 +++ new/pytest-qt-2.3.1/.travis.yml 2018-01-05 01:29:08.000000000 +0100 @@ -3,14 +3,24 @@ dist: trusty env: - - PYTEST_QT_API=pyqt4 PYTHON=python2.7 - - PYTEST_QT_API=pyqt4v2 PYTHON=python2.7 - - PYTEST_QT_API=pyside PYTHON=python2.7 - - - PYTEST_QT_API=pyqt4 PYTHON=python3.4 - - PYTEST_QT_API=pyqt4v2 PYTHON=python3.4 - - PYTEST_QT_API=pyside PYTHON=python3.4 - - PYTEST_QT_API=pyqt5 PYTHON=python3.4 + global: + # used by ci-helpers + - 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 + - PYTEST_QT_API=pyqt4v2 PYQT_PACKAGE="pyqt=4.*" PYTHON_VERSION=2.7 + - PYTEST_QT_API=pyside PYQT_PACKAGE="pyside=1.*" PYTHON_VERSION=2.7 + + - PYTEST_QT_API=pyqt4 PYQT_PACKAGE="pyqt=4.*" PYTHON_VERSION=3.4 + - PYTEST_QT_API=pyqt4v2 PYQT_PACKAGE="pyqt=4.*" PYTHON_VERSION=3.4 + - PYTEST_QT_API=pyside PYQT_PACKAGE="pyside=1.*" PYTHON_VERSION=3.4 + + - PYTEST_QT_API=pyqt5 PYQT_PACKAGE="pyqt=5.*" PYTHON_VERSION=3.5 + - PYTEST_QT_API=pyside2 PYQT_PACKAGE="pyside2=2.*" PYTHON_VERSION=3.5 + + - PYTEST_QT_API=pyqt5 PYQT_PACKAGE="pyqt=5.*" PYTHON_VERSION=3.6 + - PYTEST_QT_API=pyside2 PYQT_PACKAGE="pyside2=2.*" PYTHON_VERSION=3.6 install: - sudo apt-get update @@ -18,30 +28,22 @@ # Xvfb / window manager - sudo apt-get install -y xvfb herbstluftwm - # Qt - - $PYTHON scripts/install-qt.py - - # Pip (3.4 does not have it by default) - - wget https://bootstrap.pypa.io/get-pip.py - - sudo $PYTHON get-pip.py - - # Dependencies - - sudo $PYTHON -m pip install -U pytest tox coveralls + # 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 . - # pytest-qt - - sudo $PYTHON setup.py develop before_script: - - "export DISPLAY=:99.0" - - start-stop-daemon --start --background --exec /usr/bin/Xvfb -- $DISPLAY -screen 0 1024x768x24 - - sleep 3 # give xvfb some time to start - "herbstluftwm &" - sleep 1 script: - - catchsegv coverage run --source=pytestqt -m pytest tests - - sudo tox -e lint - - sudo chmod -R a+rw . + - 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 + /home/travis/miniconda/envs/test/bin/tox -e lint after_success: - coveralls @@ -50,11 +52,11 @@ provider: pypi skip_upload_docs: true user: nicoddemus + distributions: sdist bdist_wheel password: - secure: Uj4XhkIUGE8CkE9mbP4y2wrp1s+jODkEi+wXCL1ZDhcCxxs3gjEOtAlqIXS/4PMLZcxeV2rXNGzGJ6n+i6Ruj2T1wfar7hmy2faaur6tcUDhEpXLkAl6DAKlMiZbEyT4C7OpunBoYmw8Gh/3kaDeGgz4FxEiJakAqzEmmeyFvFY= + secure: Fql0uLFWz+D6p36BUm+2WB5tjUiuCkOFpU68Dnycn5cIRqZQuBzfNNZPVGHgIUGNZ5rC+rJC+edEvJoF2AB9cQ7kz86SzZuQHdEOwsnR4KQw2tkD5fw2BqH4bQ56SQ+UHAsyQAuDkjShHTrwSTJrzShIE5Poma5BqmqC4mRSgbI= on: tags: true - distributions: sdist bdist_wheel repo: pytest-dev/pytest-qt condition: $PYTEST_QT_API = pyqt5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/CHANGELOG.rst new/pytest-qt-2.3.1/CHANGELOG.rst --- old/pytest-qt-2.1.2/CHANGELOG.rst 2017-07-13 00:39:40.000000000 +0200 +++ new/pytest-qt-2.3.1/CHANGELOG.rst 2018-01-05 01:29:08.000000000 +0100 @@ -1,3 +1,37 @@ +2.3.1 +----- + +- ``PYTEST_QT_API`` environment variable correctly wins over ``qt_api`` + ini variable if both are set at the same time (`#196`_). Thanks `@mochick` for the PR. + +.. _#196: https://github.com/pytest-dev/pytest-qt/pull/196 +.. _@mochick: https://github.com/mochick + +2.3.0 +----- + +- New ``qapp_args`` fixture which can be used to pass custom arguments to + ``QApplication``. + Thanks `@The-Compiler`_ for the PR. + +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 +----- + +- ``pytest-qt`` now supports `PySide2`_ thanks to `@rth`_! + +.. _PySide2: https://wiki.qt.io/PySide2 +.. _@rth: https://github.com/rth + 2.1.2 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/PKG-INFO new/pytest-qt-2.3.1/PKG-INFO --- old/pytest-qt-2.1.2/PKG-INFO 2017-07-13 00:39:51.000000000 +0200 +++ new/pytest-qt-2.3.1/PKG-INFO 2018-01-05 01:32:46.000000000 +0100 @@ -1,17 +1,18 @@ Metadata-Version: 1.1 Name: pytest-qt -Version: 2.1.2 +Version: 2.3.1 Summary: pytest support for PyQt and PySide applications Home-page: http://github.com/pytest-dev/pytest-qt Author: Bruno Oliveira Author-email: nicodde...@gmail.com License: MIT +Description-Content-Type: UNKNOWN Description: ========= pytest-qt ========= pytest-qt is a `pytest`_ plugin that allows programmers to write tests - for `PySide`_ and `PyQt`_ applications. + for `PySide`_, `PySide2` and `PyQt`_ applications. The main usage is to use the `qtbot` fixture, responsible for handling `qApp` creation as needed and provides methods to simulate user interaction, @@ -31,6 +32,7 @@ .. _PySide: https://pypi.python.org/pypi/PySide + .. _PySide2: https://wiki.qt.io/PySide2 .. _PyQt: http://www.riverbankcomputing.com/software/pyqt .. _pytest: http://pytest.org @@ -80,16 +82,17 @@ Requirements ============ - Works with either PySide_ or PyQt_ (``PyQt5`` and ``PyQt4``) picking whichever + Works with either PySide_, PySide2_ or PyQt_ (``PyQt5`` and ``PyQt4``) picking whichever is available on the system, giving preference to the first one installed in this order: + - ``PySide2`` - ``PyQt5`` - ``PySide`` - ``PyQt4`` 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`` + ``pyqt5``, ``pyside``, ``pyside2``, ``pyqt4`` or ``pyqt4v2``. ``pyqt4v2`` sets the ``PyQt4`` API to `version 2`_. .. code-block:: ini @@ -163,6 +166,7 @@ - Florian Bruhin (`@The-Compiler <https://github.com/The-Compiler>`_); - Guilherme Quentel Melo (`@gqmelo <https://github.com/gqmelo>`_); - Francesco Montesano (`@montefra <https://github.com/montefra>`_); + - Roman Yurchak (`@rth <https://github.com/rth>`_) **Powered by** @@ -189,6 +193,7 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 Classifier: Topic :: Desktop Environment :: Window Managers Classifier: Topic :: Software Development :: Quality Assurance Classifier: Topic :: Software Development :: Testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/README.rst new/pytest-qt-2.3.1/README.rst --- old/pytest-qt-2.1.2/README.rst 2017-07-13 00:39:34.000000000 +0200 +++ new/pytest-qt-2.3.1/README.rst 2018-01-05 01:29:08.000000000 +0100 @@ -3,7 +3,7 @@ ========= pytest-qt is a `pytest`_ plugin that allows programmers to write tests -for `PySide`_ and `PyQt`_ applications. +for `PySide`_, `PySide2` and `PyQt`_ applications. The main usage is to use the `qtbot` fixture, responsible for handling `qApp` creation as needed and provides methods to simulate user interaction, @@ -23,6 +23,7 @@ .. _PySide: https://pypi.python.org/pypi/PySide +.. _PySide2: https://wiki.qt.io/PySide2 .. _PyQt: http://www.riverbankcomputing.com/software/pyqt .. _pytest: http://pytest.org @@ -72,16 +73,17 @@ Requirements ============ -Works with either PySide_ or PyQt_ (``PyQt5`` and ``PyQt4``) picking whichever +Works with either PySide_, PySide2_ or PyQt_ (``PyQt5`` and ``PyQt4``) picking whichever is available on the system, giving preference to the first one installed in this order: +- ``PySide2`` - ``PyQt5`` - ``PySide`` - ``PyQt4`` 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`` +``pyqt5``, ``pyside``, ``pyside2``, ``pyqt4`` or ``pyqt4v2``. ``pyqt4v2`` sets the ``PyQt4`` API to `version 2`_. .. code-block:: ini @@ -155,6 +157,7 @@ - Florian Bruhin (`@The-Compiler <https://github.com/The-Compiler>`_); - Guilherme Quentel Melo (`@gqmelo <https://github.com/gqmelo>`_); - Francesco Montesano (`@montefra <https://github.com/montefra>`_); +- Roman Yurchak (`@rth <https://github.com/rth>`_) **Powered by** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/appveyor.yml new/pytest-qt-2.3.1/appveyor.yml --- old/pytest-qt-2.1.2/appveyor.yml 2017-07-13 00:38:14.000000000 +0200 +++ new/pytest-qt-2.3.1/appveyor.yml 2018-01-05 01:29:08.000000000 +0100 @@ -1,27 +1,71 @@ -environment: - matrix: - - INSTALL_QT: "py34-pyqt5" - TESTENVS: "py34-pyqt5" - - - INSTALL_QT: "py35-pyqt5" - TESTENVS: "py35-pyqt5" +# Adapted from the qtpy Appveyor setup - - INSTALL_QT: "py34-pyqt4" - TESTENVS: "py34-pyqt4" +environment: + global: + PYTHON: "C:\\conda" + CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci-helpers\\appveyor\\windows_sdk.cmd" + PYTHON_ARCH: "64" # needs to be set for CMD_IN_ENV to succeed. If a mix + # of 32 bit and 64 bit builds are needed, move this + # to the matrix section. + # Used by atropy ci-helpers + CONDA_CHANNELS: "conda-forge" - - INSTALL_QT: "py27-pyqt4" - TESTENVS: "py27-pyqt4" + matrix: + - PYTHON_VERSION: "2.7" + PYTEST_QT_API: "pyqt4" + CONDA_DEPENDENCIES: "pytest pyqt=4.*" + - PYTHON_VERSION: "2.7" + PYTEST_QT_API: "pyqt4v2" + CONDA_DEPENDENCIES: "pytest pyqt=4.*" + - PYTHON_VERSION: "2.7" + PYTEST_QT_API: "pyside" + CONDA_DEPENDENCIES: "pytest pyside=1.*" + + - PYTHON_VERSION: "3.4" + PYTEST_QT_API: "pyqt4" + CONDA_DEPENDENCIES: "pytest pyqt=4.*" + - PYTHON_VERSION: "3.4" + PYTEST_QT_API: "pyqt4v2" + CONDA_DEPENDENCIES: "pytest pyqt=4.*" + - PYTHON_VERSION: "3.4" + PYTEST_QT_API: "pyside" + CONDA_DEPENDENCIES: "pytest pyside=1.*" + + - PYTHON_VERSION: "3.5" + PYTEST_QT_API: "pyqt5" + CONDA_DEPENDENCIES: "pytest pyqt=5.*" + - PYTHON_VERSION: "3.5" + PYTEST_QT_API: "pyside2" + CONDA_DEPENDENCIES: "pytest pyside2=2.*" + + - PYTHON_VERSION: "3.6" + PYTEST_QT_API: "pyqt5" + CONDA_DEPENDENCIES: "pytest pyqt=5.*" + - PYTHON_VERSION: "3.6" + PYTEST_QT_API: "pyside2" + CONDA_DEPENDENCIES: "pytest pyside2=2.*" - - TESTENVS: "py27-pyside,py34-pyside,lint" +platform: + -x64 install: - - C:\Python27\python -u scripts\install-qt.py - - C:\Python27\python -m pip install tox - -cache: - - C:\Installers -> appveyor.yml, scripts\install-qt.py + # If there is a newer build queued for the same PR, cancel this one. + # The AppVeyor 'rollout builds' option is supposed to serve the same + # purpose but it is problematic because it tends to cancel builds pushed + # directly to master instead of just PR builds (or the converse). + # credits: JuliaLang developers. + - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` + https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` + Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` + throw "There are newer queued builds for this pull request, failing early." } + - "git clone --depth 1 git://github.com/astropy/ci-helpers.git" + - "powershell ci-helpers/appveyor/install-miniconda.ps1" + - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + - "activate test" + - "pip install -e ." -build: false # Not a C# project +# Not a .NET project, we build in the install step instead +build: false test_script: - - C:\Python27\scripts\tox -e %TESTENVS% + - "%CMD_IN_ENV% python -m pytest -v tests/" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/docs/intro.rst new/pytest-qt-2.3.1/docs/intro.rst --- old/pytest-qt-2.1.2/docs/intro.rst 2017-07-13 00:38:14.000000000 +0200 +++ new/pytest-qt-2.3.1/docs/intro.rst 2018-01-05 01:29:08.000000000 +0100 @@ -30,16 +30,17 @@ Requires pytest version 2.7 or later. -Works with either ``PyQt5``, ``PySide`` or ``PyQt4``, picking whichever +Works with either ``PyQt5``, ``PyQt4``, ``PySide`` or ``PySide2``, picking whichever is available on the system giving preference to the first one installed in this order: +- ``PySide2`` - ``PyQt5`` - ``PySide`` - ``PyQt4`` 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`` +``pyqt5``, ``pyside``, ``pyside2``, ``pyqt4`` or ``pyqt4v2``. ``pyqt4v2`` sets the ``PyQt4`` API to `version 2`_. .. code-block:: ini diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/docs/reference.rst new/pytest-qt-2.3.1/docs/reference.rst --- old/pytest-qt-2.1.2/docs/reference.rst 2017-07-13 00:38:14.000000000 +0200 +++ new/pytest-qt-2.3.1/docs/reference.rst 2018-01-05 01:29:08.000000000 +0100 @@ -3,6 +3,7 @@ QtBot ----- + .. module:: pytestqt.qtbot .. autoclass:: QtBot @@ -32,3 +33,10 @@ .. module:: pytestqt.logging .. autoclass:: Record + +qapp fixture +------------ + +.. module:: pytestqt.plugin +.. autofunction:: qapp +.. autofunction:: qapp_args diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/pytest_qt.egg-info/PKG-INFO new/pytest-qt-2.3.1/pytest_qt.egg-info/PKG-INFO --- old/pytest-qt-2.1.2/pytest_qt.egg-info/PKG-INFO 2017-07-13 00:39:51.000000000 +0200 +++ new/pytest-qt-2.3.1/pytest_qt.egg-info/PKG-INFO 2018-01-05 01:32:46.000000000 +0100 @@ -1,17 +1,18 @@ Metadata-Version: 1.1 Name: pytest-qt -Version: 2.1.2 +Version: 2.3.1 Summary: pytest support for PyQt and PySide applications Home-page: http://github.com/pytest-dev/pytest-qt Author: Bruno Oliveira Author-email: nicodde...@gmail.com License: MIT +Description-Content-Type: UNKNOWN Description: ========= pytest-qt ========= pytest-qt is a `pytest`_ plugin that allows programmers to write tests - for `PySide`_ and `PyQt`_ applications. + for `PySide`_, `PySide2` and `PyQt`_ applications. The main usage is to use the `qtbot` fixture, responsible for handling `qApp` creation as needed and provides methods to simulate user interaction, @@ -31,6 +32,7 @@ .. _PySide: https://pypi.python.org/pypi/PySide + .. _PySide2: https://wiki.qt.io/PySide2 .. _PyQt: http://www.riverbankcomputing.com/software/pyqt .. _pytest: http://pytest.org @@ -80,16 +82,17 @@ Requirements ============ - Works with either PySide_ or PyQt_ (``PyQt5`` and ``PyQt4``) picking whichever + Works with either PySide_, PySide2_ or PyQt_ (``PyQt5`` and ``PyQt4``) picking whichever is available on the system, giving preference to the first one installed in this order: + - ``PySide2`` - ``PyQt5`` - ``PySide`` - ``PyQt4`` 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`` + ``pyqt5``, ``pyside``, ``pyside2``, ``pyqt4`` or ``pyqt4v2``. ``pyqt4v2`` sets the ``PyQt4`` API to `version 2`_. .. code-block:: ini @@ -163,6 +166,7 @@ - Florian Bruhin (`@The-Compiler <https://github.com/The-Compiler>`_); - Guilherme Quentel Melo (`@gqmelo <https://github.com/gqmelo>`_); - Francesco Montesano (`@montefra <https://github.com/montefra>`_); + - Roman Yurchak (`@rth <https://github.com/rth>`_) **Powered by** @@ -189,6 +193,7 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 Classifier: Topic :: Desktop Environment :: Window Managers Classifier: Topic :: Software Development :: Quality Assurance Classifier: Topic :: Software Development :: Testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/pytest_qt.egg-info/SOURCES.txt new/pytest-qt-2.3.1/pytest_qt.egg-info/SOURCES.txt --- old/pytest-qt-2.1.2/pytest_qt.egg-info/SOURCES.txt 2017-07-13 00:39:51.000000000 +0200 +++ new/pytest-qt-2.3.1/pytest_qt.egg-info/SOURCES.txt 2018-01-05 01:32:46.000000000 +0100 @@ -43,7 +43,6 @@ pytestqt/qt_compat.py pytestqt/qtbot.py pytestqt/wait_signal.py -scripts/install-qt.py scripts/link_pyqt.py tests/conftest.py tests/test_basics.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/pytestqt/_version.py new/pytest-qt-2.3.1/pytestqt/_version.py --- old/pytest-qt-2.1.2/pytestqt/_version.py 2017-07-13 00:39:51.000000000 +0200 +++ new/pytest-qt-2.3.1/pytestqt/_version.py 2018-01-05 01:32:46.000000000 +0100 @@ -1,4 +1,4 @@ # coding: utf-8 # file generated by setuptools_scm # don't change, don't track in version control -version = '2.1.2' +version = '2.3.1' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/pytestqt/modeltest.py new/pytest-qt-2.3.1/pytestqt/modeltest.py --- old/pytest-qt-2.1.2/pytestqt/modeltest.py 2017-07-13 00:38:14.000000000 +0200 +++ new/pytest-qt-2.3.1/pytestqt/modeltest.py 2018-01-05 01:29:08.000000000 +0100 @@ -448,8 +448,8 @@ (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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/pytestqt/plugin.py new/pytest-qt-2.3.1/pytestqt/plugin.py --- old/pytest-qt-2.1.2/pytestqt/plugin.py 2017-07-13 00:38:14.000000000 +0200 +++ new/pytest-qt-2.3.1/pytestqt/plugin.py 2018-01-05 01:29:08.000000000 +0100 @@ -18,16 +18,36 @@ assert format_captured_exceptions +@pytest.fixture(scope='session') +def qapp_args(): + """ + Fixture that provides QApplication arguments to use. + + You can override this fixture to pass different arguments to + ``QApplication``: + + .. code-block:: python + + @pytest.fixture(scope='session') + def qapp_args(): + return ['--arg'] + """ + return [] + + @pytest.yield_fixture(scope='session') -def qapp(): +def qapp(qapp_args): """ - fixture that instantiates the QApplication instance that will be used by + Fixture that instantiates the QApplication instance that will be used by the tests. + + You can use the ``qapp`` fixture in tests which require a ``QApplication`` + to run, but where you don't need full ``qtbot`` functionality. """ app = qt_api.QApplication.instance() if app is None: global _qapp_instance - _qapp_instance = qt_api.QApplication([]) + _qapp_instance = qt_api.QApplication(qapp_args) yield _qapp_instance else: yield app # pragma: no cover diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/pytestqt/qt_compat.py new/pytest-qt-2.3.1/pytestqt/qt_compat.py --- old/pytest-qt-2.1.2/pytestqt/qt_compat.py 2017-07-13 00:39:34.000000000 +0200 +++ new/pytest-qt-2.3.1/pytestqt/qt_compat.py 2018-01-05 01:29:08.000000000 +0100 @@ -1,6 +1,6 @@ """ Provide a common way to import Qt classes used by pytest-qt in a unique manner, -abstracting API differences between PyQt4, PyQt5 and PySide. +abstracting API differences between PyQt4, PyQt5, PySide and PySide2. .. note:: This module is not part of pytest-qt public API, hence its interface may change between releases and users should not rely on it. @@ -8,8 +8,7 @@ Based on from https://github.com/epage/PythonUtils. """ -from __future__ import with_statement -from __future__ import division +from __future__ import with_statement, division from collections import namedtuple import os @@ -29,7 +28,7 @@ api = os.environ.get('PYTEST_QT_API') if api is not None: api = api.lower() - if api not in ('pyside', 'pyqt4', 'pyqt4v2', 'pyqt5'): # pragma: no cover + if api not in ('pyside', 'pyside2', 'pyqt4', 'pyqt4v2', 'pyqt5'): # pragma: no cover msg = 'Invalid value for $PYTEST_QT_API: %s' raise RuntimeError(msg % api) return api @@ -42,22 +41,27 @@ except ImportError: return False - if _can_import('PyQt5'): + # Note, not importing only the root namespace because when uninstalling from conda, + # the namespace can still be there. + if _can_import('PySide2.QtCore'): + return 'pyside2' + elif _can_import('PyQt5.QtCore'): return 'pyqt5' - elif _can_import('PySide'): + elif _can_import('PySide.QtCore'): return 'pyside' - elif _can_import('PyQt4'): + elif _can_import('PyQt4.QtCore'): return 'pyqt4' return None def set_qt_api(self, api): - self.pytest_qt_api = api or self._get_qt_api_from_env() or self._guess_qt_api() + self.pytest_qt_api = self._get_qt_api_from_env() or api or self._guess_qt_api() if not self.pytest_qt_api: # pragma: no cover - msg = 'pytest-qt requires either PySide, PyQt4 or PyQt5 to be installed' + msg = 'pytest-qt requires either PySide, PySide2, PyQt4 or PyQt5 to be installed' raise RuntimeError(msg) _root_modules = { 'pyside': 'PySide', + 'pyside2': 'PySide2', 'pyqt4': 'PyQt4', 'pyqt4v2': 'PyQt4', 'pyqt5': 'PyQt5', @@ -100,21 +104,33 @@ self.qInstallMsgHandler = None self.qInstallMessageHandler = None - if self.pytest_qt_api == 'pyside': + if self.pytest_qt_api.startswith('pyside'): self.Signal = QtCore.Signal self.Slot = QtCore.Slot self.Property = QtCore.Property - self.QApplication = QtGui.QApplication - self.QWidget = QtGui.QWidget self.QStringListModel = QtGui.QStringListModel - self.qInstallMsgHandler = QtCore.qInstallMsgHandler self.QStandardItem = QtGui.QStandardItem self.QStandardItemModel = QtGui.QStandardItemModel - self.QStringListModel = QtGui.QStringListModel - self.QSortFilterProxyModel = QtGui.QSortFilterProxyModel self.QAbstractListModel = QtCore.QAbstractListModel self.QAbstractTableModel = QtCore.QAbstractTableModel + self.QStringListModel = QtGui.QStringListModel + + if self.pytest_qt_api == 'pyside2': + _QtWidgets = _import_module('QtWidgets') + self.QApplication = _QtWidgets.QApplication + self.QWidget = _QtWidgets.QWidget + self.QLineEdit = _QtWidgets.QLineEdit + self.qInstallMessageHandler = QtCore.qInstallMessageHandler + + self.QSortFilterProxyModel = QtCore.QSortFilterProxyModel + else: + self.QApplication = QtGui.QApplication + self.QWidget = QtGui.QWidget + self.QLineEdit = QtGui.QLineEdit + self.qInstallMsgHandler = QtCore.qInstallMsgHandler + + self.QSortFilterProxyModel = QtGui.QSortFilterProxyModel def extract_from_variant(variant): """PySide does not expose QVariant API""" @@ -180,9 +196,16 @@ self.make_variant = make_variant def get_versions(self): - if self.pytest_qt_api == 'pyside': - import PySide - return VersionTuple('PySide', PySide.__version__, self.QtCore.qVersion(), + if self.pytest_qt_api in ('pyside', 'pyside2'): + qt_api_name = 'PySide2' if self.pytest_qt_api == 'pyside2' else 'PySide' + if self.pytest_qt_api == 'pyside2': + import PySide2 + version = PySide2.__version__ + else: + import PySide + version = PySide.__version__ + + return VersionTuple(qt_api_name, version, self.QtCore.qVersion(), self.QtCore.__version__) else: qt_api_name = 'PyQt5' if self.pytest_qt_api == 'pyqt5' else 'PyQt4' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/pytestqt/qtbot.py new/pytest-qt-2.3.1/pytestqt/qtbot.py --- old/pytest-qt-2.1.2/pytestqt/qtbot.py 2017-07-13 00:38:14.000000000 +0200 +++ new/pytest-qt-2.3.1/pytestqt/qtbot.py 2018-01-05 01:29:08.000000000 +0100 @@ -218,7 +218,7 @@ .. note:: This method is also available as ``wait_for_window_shown`` (pep-8 alias) """ - if qt_api.pytest_qt_api == 'pyqt5': + if hasattr(qt_api.QtTest.QTest, 'qWaitForWindowExposed'): return qt_api.QtTest.QTest.qWaitForWindowExposed(widget) else: return qt_api.QtTest.QTest.qWaitForWindowShown(widget) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/scripts/install-qt.py new/pytest-qt-2.3.1/scripts/install-qt.py --- old/pytest-qt-2.1.2/scripts/install-qt.py 2017-07-13 00:38:14.000000000 +0200 +++ new/pytest-qt-2.3.1/scripts/install-qt.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,88 +0,0 @@ -""" -Simple script to install PyQt or PySide in CI (Travis and AppVeyor). -""" -from __future__ import print_function -import os -import sys -import subprocess -import urllib - - -if 'APPVEYOR' in os.environ: - def fix_registry(python_ver): - """Update install path on windows registry so PyQt installation installs at the correct - location. - python_ver must be "34", "27", etc. - """ - import _winreg as winreg - python_dir = r'C:\Python%s' % python_ver - print("Fixing registry %s..." % python_ver) - assert os.path.isdir(python_dir) - registry_key = r'Software\Python\PythonCore\%s.%s' % (python_ver[0], python_ver[1]) - with winreg.OpenKey(winreg.HKEY_CURRENT_USER, - registry_key, 0, - winreg.KEY_WRITE) as key: - winreg.SetValue(key, 'InstallPath', winreg.REG_SZ, python_dir) - - base_url = 'http://downloads.sourceforge.net/project/pyqt/' - downloads = { - 'py34-pyqt5': 'PyQt5/PyQt-5.5/PyQt5-5.5-gpl-Py3.4-Qt5.5.0-x32.exe', - 'py35-pyqt5': 'PyQt5/PyQt-5.6/PyQt5-5.6-gpl-Py3.5-Qt5.6.0-x32-2.exe', - 'py34-pyqt4': 'PyQt4/PyQt-4.11.4/PyQt4-4.11.4-gpl-Py3.4-Qt4.8.7-x32.exe', - 'py27-pyqt4': 'PyQt4/PyQt-4.11.4/PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe', - } - if 'INSTALL_QT' in os.environ: - fix_registry('35') - caption = os.environ['INSTALL_QT'] - installers_dir = r'C:\Installers' - if not os.path.isdir(installers_dir): - os.makedirs(installers_dir) - installer = os.path.join(installers_dir, 'install-%s.exe' % caption) - if not os.path.isfile(installer): - # download all files because the cache is for all builds - for cap, url in sorted(downloads.items()): - print("Downloading %s..." % cap) - filename = os.path.join(installers_dir, 'install-%s.exe' % cap) - urllib.urlretrieve(base_url + url, filename) - else: - print('Using cached installers') - print('Installing %s...' % caption) - subprocess.check_call([installer, '/S']) - python = caption.split('-')[0] - assert python[:2] == 'py' - executable = r'C:\Python%s\python.exe' % python[2:] - url = downloads[caption] - module = url.split('/')[0] - cmdline = [executable, '-c', 'import %s;print(%s)' % (module, module)] - print('Checking: %r' % cmdline) - subprocess.check_call(cmdline) - print('OK') - else: - print('Skip install for this build') - -elif 'TRAVIS' in os.environ: - def apt_get_install(packages): - print('Installing %s...' % ', '.join(packages)) - subprocess.check_call(['sudo', 'apt-get', 'install', '-y', '-qq'] + packages) - - py3k = sys.version_info[0] == 3 - pyqt_version = {'pyqt4': 4, - 'pyqt4v2': 4, - 'pyqt5': 5, - } - if os.environ['PYTEST_QT_API'] in pyqt_version: - pyqt_ver = pyqt_version[os.environ['PYTEST_QT_API']] - if py3k: - pkg = 'python3-pyqt%s' % pyqt_ver - else: - pkg = 'python-qt%s' % pyqt_ver - apt_get_install([pkg]) - else: - if py3k: - pkg = 'python3-pyside' - else: - pkg = 'python-pyside' - apt_get_install([pkg]) - -else: - print('Nothing to do (not in Travis or AppVeyor)') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/setup.cfg new/pytest-qt-2.3.1/setup.cfg --- old/pytest-qt-2.1.2/setup.cfg 2017-07-13 00:39:51.000000000 +0200 +++ new/pytest-qt-2.3.1/setup.cfg 2018-01-05 01:32:46.000000000 +0100 @@ -4,5 +4,4 @@ [egg_info] tag_build = tag_date = 0 -tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/setup.py new/pytest-qt-2.3.1/setup.py --- old/pytest-qt-2.1.2/setup.py 2017-07-13 00:38:14.000000000 +0200 +++ new/pytest-qt-2.3.1/setup.py 2018-01-05 01:29:08.000000000 +0100 @@ -52,6 +52,7 @@ 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', 'Topic :: Desktop Environment :: Window Managers', 'Topic :: Software Development :: Quality Assurance', 'Topic :: Software Development :: Testing', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/tests/test_basics.py new/pytest-qt-2.3.1/tests/test_basics.py --- old/pytest-qt-2.1.2/tests/test_basics.py 2017-07-13 00:39:34.000000000 +0200 +++ new/pytest-qt-2.3.1/tests/test_basics.py 2018-01-05 01:29:08.000000000 +0100 @@ -1,4 +1,5 @@ import os +import sys import weakref import pytest from pytestqt.qt_compat import qt_api @@ -324,13 +325,15 @@ pytestqt.qtbot._parse_ini_boolean('foo') -@pytest.mark.parametrize('option_api', ['pyqt4', 'pyqt5', 'pyside']) -def test_qt_api_ini_config(testdir, option_api): +@pytest.mark.parametrize('option_api', ['pyqt4', 'pyqt5', 'pyside', 'pyside2']) +def test_qt_api_ini_config(testdir, monkeypatch, option_api): """ Test qt_api ini option handling. """ from pytestqt.qt_compat import qt_api + monkeypatch.delenv("PYTEST_QT_API") + testdir.makeini(""" [pytest] qt_api={option_api} @@ -344,7 +347,45 @@ ''') result = testdir.runpytest_subprocess() - if qt_api.pytest_qt_api.startswith(option_api): # handle pyqt4v2 + if qt_api.pytest_qt_api.replace('v2', '') == option_api: # handle pyqt4v2 + result.stdout.fnmatch_lines([ + '* 1 passed in *' + ]) + else: + try: + ModuleNotFoundError + except NameError: + # Python < 3.6 + result.stderr.fnmatch_lines([ + '*ImportError:*' + ]) + else: + # Python >= 3.6 + result.stderr.fnmatch_lines([ + '*ModuleNotFoundError:*' + ]) + + +@pytest.mark.parametrize('envvar', ['pyqt4', 'pyqt5', 'pyside', 'pyside2']) +def test_qt_api_ini_config_with_envvar(testdir, monkeypatch, envvar): + """ensure environment variable wins over config value if both are present + """ + testdir.makeini(""" + [pytest] + qt_api={option_api} + """.format(option_api='piecute')) + + monkeypatch.setenv('PYTEST_QT_API', envvar) + + testdir.makepyfile(''' + import pytest + + def test_foo(qtbot): + pass + ''') + + result = testdir.runpytest_subprocess() + if qt_api.pytest_qt_api.replace('v2', '') == envvar: result.stdout.fnmatch_lines([ '* 1 passed in *' ]) @@ -376,3 +417,28 @@ monkeypatch.setenv('PYTEST_QT_API', 'piecute') result = testdir.runpytest_subprocess() result.stderr.fnmatch_lines(['* Invalid value for $PYTEST_QT_API: piecute']) + + +@pytest.mark.skipif(qt_api.pytest_qt_api in ['pyqt4', 'pyqt4v2', 'pyside'], + reason="QApplication.arguments() doesn't return custom arguments with Qt4 and Windows") +def test_qapp_args(testdir): + """ + Test customizing of QApplication arguments. + """ + testdir.makeconftest( + ''' + import pytest + + @pytest.fixture(scope='session') + def qapp_args(): + return ['--test-arg'] + ''' + ) + testdir.makepyfile(''' + def test_args(qapp): + assert '--test-arg' in list(qapp.arguments()) + ''') + result = testdir.runpytest_subprocess() + result.stdout.fnmatch_lines([ + '*= 1 passed in *' + ]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/tests/test_logging.py new/pytest-qt-2.3.1/tests/test_logging.py --- old/pytest-qt-2.1.2/tests/test_logging.py 2017-07-13 00:38:14.000000000 +0200 +++ new/pytest-qt-2.3.1/tests/test_logging.py 2018-01-05 01:29:08.000000000 +0100 @@ -4,6 +4,8 @@ from pytestqt.qt_compat import qt_api +pytestmark = pytest.mark.skipif(qt_api.pytest_qt_api == 'pyside2', reason="https://bugreports.qt.io/browse/PYSIDE-435") + @pytest.mark.parametrize('test_succeeds', [True, False]) @pytest.mark.parametrize('qt_log', [True, False]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/tests/test_qtest_proxies.py new/pytest-qt-2.3.1/tests/test_qtest_proxies.py --- old/pytest-qt-2.1.2/tests/test_qtest_proxies.py 2017-07-13 00:38:14.000000000 +0200 +++ new/pytest-qt-2.3.1/tests/test_qtest_proxies.py 2018-01-05 01:29:08.000000000 +0100 @@ -4,7 +4,7 @@ from pytestqt.qt_compat import qt_api -fails_on_pyqt = pytest.mark.xfail('qt_api.pytest_qt_api != "pyside"') +fails_on_pyqt = pytest.mark.xfail('not qt_api.pytest_qt_api.startswith("pyside")') @pytest.mark.parametrize('expected_method', [ @@ -29,4 +29,4 @@ Ensure that we are exporting expected QTest API methods. """ assert hasattr(qtbot, expected_method) - assert getattr(qtbot, expected_method).__name__ == expected_method \ No newline at end of file + assert getattr(qtbot, expected_method).__name__ == expected_method diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/tests/test_wait_signal.py new/pytest-qt-2.3.1/tests/test_wait_signal.py --- old/pytest-qt-2.1.2/tests/test_wait_signal.py 2017-07-13 00:38:14.000000000 +0200 +++ new/pytest-qt-2.3.1/tests/test_wait_signal.py 2018-01-05 01:29:08.000000000 +0100 @@ -293,8 +293,8 @@ For some reason, this crashes PySide although it seems perfectly fine code. """ - if qt_api.pytest_qt_api == 'pyside': - pytest.skip('test crashes PySide') + if qt_api.pytest_qt_api.startswith('pyside'): + pytest.skip('test crashes PySide and PySide2') import sip @@ -708,7 +708,7 @@ Returns a list of signals with the guarantee that the signals have names (i.e. the names are manually provided in case of using PySide, where the signal names cannot be determined at run-time). """ - if qt_api.pytest_qt_api == 'pyside': + if qt_api.pytest_qt_api.startswith('pyside'): signals = [(signaller.signal, "signal()"), (signaller.signal_args, "signal_args(QString,int)"), (signaller.signal_args, "signal_args(QString,int)")] else: @@ -790,7 +790,7 @@ In a situation where a signal without args is expected but not emitted, tests that the TimeoutError message contains the name of the signal (without arguments). """ - if qt_api.pytest_qt_api == 'pyside': + if qt_api.pytest_qt_api.startswith('pyside'): signal = (signaller.signal, "signal()") else: signal = signaller.signal @@ -811,7 +811,7 @@ if sys.version_info >= (3,5): pytest.skip("Only on Python 3.4 and lower double-wrapped functools.partial callbacks are a problem") - if qt_api.pytest_qt_api == 'pyside': + if qt_api.pytest_qt_api.startswith('pyside'): signal = (signaller.signal_single_arg, "signal_single_arg(int)") else: signal = signaller.signal_single_arg @@ -836,7 +836,7 @@ rejected by a callback, tests that the TimeoutError message contains the name of the signal and the list of non-accepted arguments. """ - if qt_api.pytest_qt_api == 'pyside': + if qt_api.pytest_qt_api.startswith('pyside'): signal = (signaller.signal_single_arg, "signal_single_arg(int)") else: signal = signaller.signal_single_arg @@ -858,7 +858,7 @@ rejected by a callback, tests that the TimeoutError message contains the name of the signal and the list of tuples of the non-accepted arguments. """ - if qt_api.pytest_qt_api == 'pyside': + if qt_api.pytest_qt_api.startswith('pyside'): signal = (signaller.signal_args, "signal_args(QString,int)") else: signal = signaller.signal_args @@ -999,7 +999,7 @@ by the user. This degenerate messages doesn't contain the signals' names, and includes a hint to the user how to fix the situation. """ - if qt_api.pytest_qt_api != 'pyside': + if not qt_api.pytest_qt_api.startswith('pyside'): pytest.skip("test only makes sense for PySide, whose signals don't contain a name!") with pytest.raises(TimeoutError) as excinfo: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-qt-2.1.2/tox.ini new/pytest-qt-2.3.1/tox.ini --- old/pytest-qt-2.1.2/tox.ini 2017-07-13 00:39:40.000000000 +0200 +++ new/pytest-qt-2.3.1/tox.ini 2018-01-05 01:29:08.000000000 +0100 @@ -33,4 +33,3 @@ commands= rst-lint {toxinidir}/CHANGELOG.rst {toxinidir}/README.rst sphinx-build -q -E -W -b html . _build - ++++++ skip-timeout-tests.patch ++++++ Index: pytest-qt-2.3.1/tests/test_basics.py =================================================================== --- pytest-qt-2.3.1.orig/tests/test_basics.py +++ pytest-qt-2.3.1/tests/test_basics.py @@ -73,6 +73,7 @@ def test_stop_for_interaction(qtbot, tim @pytest.mark.parametrize('show', [True, False]) @pytest.mark.parametrize('method_name', ['waitExposed', 'waitActive']) +@pytest.mark.skip(reason="Fails in OBS randomly") def test_wait_window(show, method_name, qtbot): """ Using one of the wait-widget methods should not raise anything if the widget