Commit Graph

20 Commits

Author SHA256 Message Date
660e73eebb Accepting request 1177527 from home:alarrosa:branches:devel:languages:python:pytest
- Run test_destroyed again, the problem was fixed in the
  python3-pyside6 package.

OBS-URL: https://build.opensuse.org/request/show/1177527
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=34
2024-05-29 10:51:09 +00:00
b0c1ce367b - Skip test_destroyed, this test fails with pyside6 6.7.0
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=32
2024-05-28 06:18:15 +00:00
fed9d66259 - update to 4.4.0:
* Fixed exception handling so they are properly cleared in
    Python 3.12, due to the new sys.last_exc attribute (#532).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=30
2024-03-16 09:34:55 +00:00
93b346d60c Accepting request 1142118 from home:bnavigator:branches:KDE:Qt:PyQt
- Don't require any backend. The testing application should
  specify their set explicitly.
- Test pyside on SLE15 python module

OBS-URL: https://build.opensuse.org/request/show/1142118
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=28
2024-01-29 05:43:39 +00:00
d96f4a1a95 Accepting request 1141539 from home:bnavigator:branches:devel:languages:python:pytest
- %sle15_python_module_pythons must define %pythons before any
  %python_module usage

OBS-URL: https://build.opensuse.org/request/show/1141539
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=26
2024-01-26 09:35:36 +00:00
76ad2a14b7 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=24 2024-01-05 17:13:34 +00:00
672426525f - update to 4.3.1:
* Added official support for Python 3.12.
  * Python 3.7 is no longer supported.
  * qapp now sets up the QApplication instance with a command
    line argument like this QApplication([prog_name]) instead of
    using an empty list QApplication([]). Here prog_name is the
    name of the app which defaults to pytest-qt-app, but can be
    redefined in the pytest.ini file, see :ref:`qapp
    fixture<setting-qapp-name>`. Alternatively, the arguments
    that will be passed to QApplication can be defined explicitly
    using the qapp_args fixture. This means that the default
    behavior of the qapp_args fixture is now also changed
    accordingly: it now returns the list [prog_name] instead of
    an empty list.
    `@The-Compiler`_ for the PR.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=23
2024-01-05 17:13:09 +00:00
b9849f523f Accepting request 1094952 from home:bnavigator:branches:devel:languages:python:pytest
- Remove xfail_strict from pytest config
  * pyside2 and py311 XPASS a test, gh#pytest-dev/pytest-qt#419

OBS-URL: https://build.opensuse.org/request/show/1094952
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=21
2023-06-25 19:15:18 +00:00
d161947cf5 Accepting request 1092136 from home:ecsos:python
- Add %{?sle15_python_module_pythons}

OBS-URL: https://build.opensuse.org/request/show/1092136
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=19
2023-06-11 11:33:29 +00:00
17a11e55bc Accepting request 1088030 from home:bnavigator:branches:devel:languages:python:pytest
- Skip failing exception tests with pyside6
  * gh#pytest-dev/pytest-qt#488
- Use PEP517

OBS-URL: https://build.opensuse.org/request/show/1088030
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=17
2023-05-20 10:55:42 +00:00
1e14221a84 - Remove python_module macro definition
- Update to 4.2.0:
  * Import the code sub-package from the correct location rather than the
    deprecated py package, restoring compatibility with pytest 7.2.0, where py
    was dropped. Thanks @The-Compiler for the PR.
  * Use pytest.hookimpl to configure hooks, avoiding a deprecation warning in
    pytest 7.2.0. Thanks @The-Compiler for the PR.
  * Now pytest-qt will check if any of the Qt libraries is already imported by
    the time the plugin loads, and use it if that is the case (#412). Thanks
    @eyllanesc for the PR.
  * Most custom pytest-qt exceptions can be accessed via qtbot (for example
    qtbot.TimeoutError), but it was not always explicit in the documentation
    that this is the recommended way to access those exceptions, instead of
    importing them from pytestqt.exceptions. This is now clarified in the
    documentation and examples, and an alias to ScreenshotError has been added
    to qtbot so it can be accessed in the same way (#460).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=15
2022-11-30 12:27:28 +00:00
e74f83a471 Accepting request 986276 from home:bnavigator:branches:devel:languages:python:pytest
- Update to version 4.1.0
  * pytest-qt now requires Python 3.7+.
  * Improved PEP-8 aliases definition so they have a smaller call
    stack depth by one and better parameter suggestions in IDEs.
    (#383). Thanks @luziferius for the PR.
  * Updated model tester handling around hasChildren based on Qt's
    updates.
  * New qapp_cls fixture returning the QApplication class to use,
    thus making it easier to use a custom subclass without having
    to override the whole qapp fixture. Thanks @The-Compiler for
    the PR.
  * Updated model tester to track/verify in-flight changes based on
    Qt's updates. Thanks @The-Compiler for the PR.
  * New qtbot.screenshot() method which can be used to take a
    screenshot of the given widget. Thanks @The-Compiler for the
    PR.

- Enable pyside6 test flavor

OBS-URL: https://build.opensuse.org/request/show/986276
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=13
2022-07-04 21:43:28 +00:00
5dedac22c0 Accepting request 905961 from home:bnavigator:branches:devel:languages:python:pytest
- Allow either of the valid Qt binding implementations, do not hard
  require python-qt5
- Enable multibuild for tests with different implementations
  * Pyside2, PyQt5, PyQt6
  * Prepared for Pyside6
- Update to version 4.0.2
  * Restored compatibility with PySide2 5.11, which doesn't depend on the
    ``shiboken2`` project, used by pytest-qt 4.0.0. The dependency is now not
    needed anymore, and the ``.isdeleted`` attribute of ``qt_compat`` (which
    isn't intended for public use) is removed.
- Release 4.0.1
  * The ``sip`` module now gets imported directly if ``PyQt5.sip`` /
    ``PyQt6.sip`` wasn't found, as it's still packaged like that in some
    distributions (`#369`_). Thanks `@The-Compiler`_ for the PR.
- Release 4.0.0
  * `PySide6 <https://pypi.org/project/PySide6>`__ and `PyQt6 <https://pypi.org/project/PyQt6>`__ (6.1+)
    are now supported. Thanks `@jensheilman`_ and `@The-Compiler`_ for the PRs (`#328`_, `#330`_).
  * ``pytest-qt`` now requires Python 3.6+.
  * When using PyQt5, ``pytest-qt`` now requires PyQt5 5.11 or newer (`#330`_).
  * Support for Qt4 (i.e. ``PyQt4`` and ``PySide``) is now dropped (`#279`_).
  * The ``qtbot.waitActive`` and ``qtbot.waitExposed`` context managers are now
    available with all Qt APIs, rather than only PyQt5 (`#361`_). Thanks
    `@The-Compiler`_ for the PR.
  * The ``qtbot.waitForWindowShown`` method is deprecated, as the underlying Qt
    method was obsoleted in Qt 5.0 and removed in Qt 6.0. Its name is imprecise and
    the pytest-qt wrapper does not raise TimeoutError if the window wasn't shown.
    Please use the ``qtbot.waitExposed`` context manager instead (`#361`_). Thanks
    `@The-Compiler`_ for the PR.
  * The old ``qtbot.stopForInteraction()`` name is now removed as it was
    cumbersome and rarely used. Use ``qtbot.stop()`` (added in 1.1.1) instead
    (`#306`_). Thanks `@The-Compiler`_ for the PR.
  * The old ``SignalTimeoutError`` exception alias is now removed, as it was renamed to
    ``TimeoutError`` in 2.1 (`#306`_). Thanks `@The-Compiler`_ for the PR.
  * The old ``qt_wait_signal_raising`` option is now removed, as it was renamed to
    ``qt_default_raising`` in 3.1 (`#306`_). Thanks `@The-Compiler`_ for the PR.
  * ``qtbot.waitSignal`` and ``waitSignals`` (as well as their PEP-8 aliases)
    supported passing ``None`` as signal, making them wait for the given timeout
    instead. This is not supported anymore, use ``qtbot.wait(ms)`` instead
    (`#306`_). Thanks `@The-Compiler`_ for the PR.
  * Various arguments to ``qtbot`` methods are now keyword-only (`#366`_):
    * ``qtbot.waitActive``: ``timeout`` (``widget`` being the only positional argument)
    * ``qtbot.waitExposed``: ``timeout`` (``widget`` being the only positional argument)
    * ``qtbot.waitSignal``:  ``timeout``, ``raising`` and ``check_params_cb`` (``signal`` being the only positional argument)
    * ``qtbot.waitSignals``:  ``timeout``, ``raising`` and ``check_params_cbs`` (``signals`` being the only positional argument)
    * ``qtbot.assertNotEmitted``:  ``wait`` (``signal`` being the only positional argument)
    * ``qtbot.waitUntil``:  ``timeout`` (``callback`` being the only positional argument)
    * ``qtbot.waitCallback``:  ``timeout`` and ``raising`` (with no positional arguments)
    The same applies to the respective PEP-8 aliases. Thanks `@The-Compiler`_ for
    the PR.
  * Various classes are now not importable from ``pytestqt.plugin`` anymore, and
    should instead be imported from the module they're residing in since the 1.6.0
    release (`#306`_):
    * ``pytestqt.plugin.QtBot`` -> ``pytestqt.qtbot.QtBot``
    * ``pytestqt.plugin.SignalBlocker`` -> ``pytestqt.wait_signal.SignalBlocker``
    * ``pytestqt.plugin.MultiSignalBlocker`` -> ``pytestqt.wait_signal.MultiSignalBlocker``
    * ``pytestqt.plugin.Record`` -> ``pytestqt.logging.Record``
    * ``pytestqt.plugin.capture_exceptions`` ->
      ``pytestqt.exceptions.capture_exceptions`` (but consider using
      ``qtbot.capture_exceptions`` instead)
    * ``pytestqt.plugin.format_captured_exceptions`` ->
      ``pytestqt.exceptions.format_captured_exceptions``
  * The ``qt_api.extract_from_variant`` and ``qt_api.make_variant`` functions
    (which were never intended for public usage) as well as all class aliases
    (such as ``qt_api.QWidget`` or ``qt_api.QEvent``, among others) are now
    removed. Thanks `@The-Compiler`_ for the PR.
  * The default timeouts for ``qtbot.waitSignal``, ``waitSignals``, ``waitUntil``
    and ``waitCallback``, ``waitActive`` and ``waitExposed`` have been raised from
    1s to 5s. This makes them in line the default timeout used by Qt's underlying
    methods such as ``QSignalSpy::wait``. To get the old behavior back, explicitly
    pass ``timeout=1000`` to those functions (`#306`_). Thanks `@The-Compiler`_
    for the PR.
  * ``waitUntil`` now raises a ``TimeoutError`` when a timeout occurs to make the
    cause of the timeout more explict (`#222`_). Thanks `@karlch`_ for the PR.
  * The ``QtTest::keySequence`` method is now exposed (if available, with Qt >=
    5.10) (`#289`_). Thanks `@The-Compiler`_ for the PR.
  * ``addWidget`` now enforces that its argument is a ``QWidget`` in order to
    display a clearer error when this isn't the case (`#290`_). Thanks
    `@The-Compiler`_ for the PR.
  * New option ``qt_qapp_name`` can be used to set the name of the
    ``QApplication`` created by ``pytest-qt``, defaulting to ``"pytest-qt-qapp"``
    (`#302`_). Thanks `@The-Compiler`_ for the PR.
  * When the ``-s`` (``--capture=no``) argument is passed to pytest, Qt log
    capturing is now disabled as well (`#300`_). Thanks `@The-Compiler`_ for the PR.
  * PEP-8 aliases (``add_widget``, ``wait_active``, etc) are no longer just simple
    assignments to the methods, but they are real methods which call the normal
    implementations. This makes subclasses work as expected, instead of having to
    duplicate the assignment (`#326`_, `#333`_). Thanks `@oliveira-mauricio`_ and
    `@jensheilman`_ for the PRs.
  * Errors related to the ``qt_compat`` module (such as an invalid
    ``PYTEST_QT_API`` setting or missing Qt API wrappers) are now shown as a more
    human-readable error message rather than an internal pytest error (`#355`_). Thanks
    `@The-Compiler`_ for the PR.

OBS-URL: https://build.opensuse.org/request/show/905961
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=12
2021-07-13 09:06:16 +00:00
Tomáš Chvátal
e705392566 Accepting request 837360 from home:bnavigator:branches:devel:languages:python:pytest
- require a default ttf font gh#pytest-dev/pytest-qt#317
- move to %pytest macro and use pytest-xvfb plugin
- drop skip-timeout-tests.patch; deselect by pytest -k parameter

OBS-URL: https://build.opensuse.org/request/show/837360
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=10
2020-09-25 10:25:35 +00:00
Tomáš Chvátal
0d37ee1048 - Update to 3.3.0:
* Improve message in uncaught exceptions by mentioning the Qt event loop instead of Qt virtual methods (#255).
  * pytest-qt now requires pytest version >= 3.0.
  * qtbot.addWiget now supports an optional before_close_func keyword-only argument, which if given is a function which is called before the widget is closed, with the widget as first argument.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=8
2020-01-06 13:10:59 +00:00
Tomáš Chvátal
125469be17 - Update to 3.2.2:
* Fix Off-by-one error in modeltester (#249). Thanks @ext-jmmugnes for the PR.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=6
2019-01-31 09:14:12 +00:00
Todd R
9697dcef53 Accepting request 656134 from home:TheBlackCat:branches:devel:languages:python:pytest
Update to version 3.2.1
Fixes build errors

OBS-URL: https://build.opensuse.org/request/show/656134
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-qt?expand=0&rev=4
2018-12-07 19:25:44 +00:00
Dominique Leuenberger
c967b08bc0 Accepting request 613325 from devel:languages:python:pytest
OBS-URL: https://build.opensuse.org/request/show/613325
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-qt?expand=0&rev=3
2018-06-02 10:12:48 +00:00
Dominique Leuenberger
0e54ef3b26 Accepting request 606759 from devel:languages:python
- Enable tests
- Add patch skip-timeout-tests.patch to skip test randomly
  failing in OBS

- 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!

OBS-URL: https://build.opensuse.org/request/show/606759
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-qt?expand=0&rev=2
2018-05-15 08:14:27 +00:00
Dominique Leuenberger
580fcb0fee Accepting request 519217 from devel:languages:python
Needed by the latest version of spyder and spyder3

OBS-URL: https://build.opensuse.org/request/show/519217
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-qt?expand=0&rev=1
2017-08-30 14:22:12 +00:00