summaryrefslogtreecommitdiff
path: root/dev-python/pytest-qt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-python/pytest-qt
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-python/pytest-qt')
-rw-r--r--dev-python/pytest-qt/Manifest8
-rw-r--r--dev-python/pytest-qt/files/pytest-qt-3.3.0-fix-file-match-test.patch13
-rw-r--r--dev-python/pytest-qt/files/pytest-qt-3.3.0-skip-show-window-test.patch36
-rw-r--r--dev-python/pytest-qt/pytest-qt-3.3.0.ebuild63
-rw-r--r--dev-python/pytest-qt/pytest-qt-4.0.2-r1.ebuild11
-rw-r--r--dev-python/pytest-qt/pytest-qt-4.1.0.ebuild65
6 files changed, 76 insertions, 120 deletions
diff --git a/dev-python/pytest-qt/Manifest b/dev-python/pytest-qt/Manifest
index 9c5c1921898a..cf1a7a4292df 100644
--- a/dev-python/pytest-qt/Manifest
+++ b/dev-python/pytest-qt/Manifest
@@ -1,7 +1,5 @@
-AUX pytest-qt-3.3.0-fix-file-match-test.patch 646 BLAKE2B 60a34a0a5d3e7d4cedd6e0e0886eeee5eb4bf447544a0f712e8906edc5ea62f60555917b97c143a4804fe76e5244090907abf51bf69f98c2893552115af64fd2 SHA512 ab68967a2f30acc2aaed1c8eadeee84283b469b3465c5e79d9c37ee14236ea0e2fe827ba83efa92d5d33c369298e548cea72f80109949426aa38121ba7edb45f
-AUX pytest-qt-3.3.0-skip-show-window-test.patch 1318 BLAKE2B 7e1c628c13f02d6219d752e3bbd6c54d17b54d45fe84b608093a42796ed6208f12c62a6bfc7a685cf3f445f5c4f6ca9e496d9b55b088cfddc28313e02c07d45d SHA512 27f788b560e66e0de3b9f17144cdc2a31fb9a4a270efdb490dfe106109051669d55e10072c841ce8f0aa313bcfec397ff59c6c76842a6a4b58194a03c3ff07d3
-DIST pytest-qt-3.3.0.tar.gz 113439 BLAKE2B 1eb486d2d44825058577306ed3b9ade34e6cbad0d90038fe314114bb22c82ae069c9fe66c170591de6c97bad99f5f9e0021c8b3dc38c858b8293a22c448bed74 SHA512 8b3ce7b62621c55fb319966b162cb60663c5ef290f34e62e6a9329e67f530c2bde1329ae0b045b15c99ae14f5f6a5fef9ee930475fa700922c50ee725adf7983
DIST pytest-qt-4.0.2.tar.gz 113466 BLAKE2B 73ba6571958f3f4cd76c3e891eaa014d464b94a7965afac6cee5b43bafdc63d4d640f84c7bfa1666146ab5139f79c760bd9f5a2a44f788b6384df200ac48ad0d SHA512 7f59c499e1395460c2ff20a969cec16ca104f742c648faa0d7eb1528c04d8ee52c04c52798478bc01c5467bee33d3389b141424491ba5442f9df4e82f0dff173
-EBUILD pytest-qt-3.3.0.ebuild 1661 BLAKE2B 8af76902d54c81283ed1627278746fd874a0bf91eede889ec3de5a0be397e8b9cc5633abd67466e6bc9508bd56c84da0b5c069d3dc9bf339dc11b7cecb51ee37 SHA512 f39627d2dd504df4601390d1a310302d3e132db8d27a8e1d801560c921a87754691798bdbe60cc7b9337417cef993229f2c7673f9c91da8f9ffd4eac8aa9540f
-EBUILD pytest-qt-4.0.2-r1.ebuild 1436 BLAKE2B 8e671b876c92f5984e487c6bc3b6cfe411a526255bda40b60dc25867d9af3c3db20a7f6bae7b8f0d3ac5077522ab0c9430b44cea86be74487f96d4bc47fdd054 SHA512 e76bb5e8499495eae1d8f5ba060e06f4b69d93d04552eaf218ce84bd0addd05f69c19cd4436d99e33124fc5b63da5b5ef54b04e200a03500a4206466c5d87fbf
+DIST pytest-qt-4.1.0.tar.gz 119702 BLAKE2B 7c906c94761df6472ae65a6ebb38dff07de8156730e3e10615ea8e08f0bd9f9fee07127ee6e8616055117b1db1911bc9b4486345d84b249664d317561195ad77 SHA512 bfb56abbaac47bf9da26eb19d6913d59872f2a9923da339e9a30a2145d0a094ddec36bcfa21d39c4cf318f95a83c72c249fe70034294a6791f9d84345f77451d
+EBUILD pytest-qt-4.0.2-r1.ebuild 1578 BLAKE2B 36e13e3720c4e5739b2673992c2f888fc45400ac04a3a5d091d92bb32712ce39f7874c61e3c6e2f1511023b2ce5e8d2b06e75b0366e1d655be5e88e7c2a8f7b2 SHA512 68a89df20780c5d41865ed9b3d560667401712abbfce2e6dfe9071252ce95877b8c7854e0f7620d90543cd4f1381685d750f0fba4f6204a8b65e5252d886b04f
+EBUILD pytest-qt-4.1.0.ebuild 1695 BLAKE2B 11efdcf4e0ce3ef578e9a803476c0928f94ed3a8fe41caba28c6263c3d1996896370002347b8c9b7dc109faa26986971e0950e705394a02b222c7ce1306ccbd6 SHA512 238e661ac00081736d35fa3284f83f7e57d72e21c5ba34a91ccb171de511cee4c566dc197a397e8e44471fe1c4f9d34f53911754ecdf41c52ea591e18e4bda82
MISC metadata.xml 516 BLAKE2B be5241e39f672681b27a003d02eca0e047644cad7da57de6b3393f58760c094c1661b9d168e44bea4efd56b38225d49abd5be6e71031a0d854b878716286d3ed SHA512 77981d63d3214fd2c052f8a7eac1a439899318973807299237a9105730893ce01d4423b060f532bd4f4496418683fc5128508c7d8747ba6ee6ed0eae67e5569f
diff --git a/dev-python/pytest-qt/files/pytest-qt-3.3.0-fix-file-match-test.patch b/dev-python/pytest-qt/files/pytest-qt-3.3.0-fix-file-match-test.patch
deleted file mode 100644
index cbdeb80c1c56..000000000000
--- a/dev-python/pytest-qt/files/pytest-qt-3.3.0-fix-file-match-test.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/tests/test_modeltest.py b/tests/test_modeltest.py
-index ef9371c..becd3ae 100644
---- a/tests/test_modeltest.py
-+++ b/tests/test_modeltest.py
-@@ -350,7 +350,7 @@ def test_qt_tester_invalid(testdir):
- "test_qt_tester_invalid.py:*: Qt modeltester errors",
- "*-- Captured Qt messages --*",
- "* QtWarningMsg: FAIL! model->columnCount(QModelIndex()) >= 0 () returned FALSE "
-- "(qabstractitemmodeltester.cpp:*)",
-+ "(*qabstractitemmodeltester.cpp:*)",
- "*-- Captured stdout call --*",
- "modeltest: Using Qt C++ tester",
- "*== 1 failed in * ==*",
diff --git a/dev-python/pytest-qt/files/pytest-qt-3.3.0-skip-show-window-test.patch b/dev-python/pytest-qt/files/pytest-qt-3.3.0-skip-show-window-test.patch
deleted file mode 100644
index 1acef2bb4922..000000000000
--- a/dev-python/pytest-qt/files/pytest-qt-3.3.0-skip-show-window-test.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff --git a/tests/test_basics.py b/tests/test_basics.py
-index 7fdaf93..a972ea0 100644
---- a/tests/test_basics.py
-+++ b/tests/test_basics.py
-@@ -82,31 +82,6 @@ def test_stop_for_interaction(qtbot, timer):
- qtbot.stopForInteraction()
-
-
--@pytest.mark.parametrize("show", [True, False])
--@pytest.mark.parametrize("method_name", ["waitExposed", "waitActive"])
--def test_wait_window(show, method_name, qtbot):
-- """
-- Using one of the wait-widget methods should not raise anything if the widget
-- is properly displayed, otherwise should raise a TimeoutError.
-- """
-- method = getattr(qtbot, method_name)
-- if qt_api.pytest_qt_api != "pyqt5":
-- with pytest.raises(RuntimeError) as exc_info:
-- with method(None, None):
-- pass
-- assert str(exc_info.value) == "Available in PyQt5 only"
-- else:
-- widget = qt_api.QWidget()
-- qtbot.add_widget(widget)
-- if show:
-- with method(widget, timeout=1000):
-- widget.show()
-- else:
-- with pytest.raises(qtbot.TimeoutError):
-- with method(widget, timeout=100):
-- pass
--
--
- @pytest.mark.parametrize("method_name", ["waitExposed", "waitActive"])
- def test_wait_window_propagates_other_exception(method_name, qtbot):
- """
diff --git a/dev-python/pytest-qt/pytest-qt-3.3.0.ebuild b/dev-python/pytest-qt/pytest-qt-3.3.0.ebuild
deleted file mode 100644
index 8e4e3f6611c2..000000000000
--- a/dev-python/pytest-qt/pytest-qt-3.3.0.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..10} )
-
-inherit distutils-r1 virtualx
-
-DESCRIPTION="pytest plugin for PyQt5 and PySide2 applications"
-HOMEPAGE="
- https://pypi.org/project/pytest-qt/
- https://github.com/pytest-dev/pytest-qt/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 x86"
-
-RDEPEND="dev-python/QtPy[gui,testlib,widgets(+),${PYTHON_USEDEP}]"
-BDEPEND="
- test? (
- dev-python/PyQt5[gui,testlib,widgets,${PYTHON_USEDEP}]
- $(python_gen_cond_dep '
- dev-python/pyside2[gui,testlib,widgets,${PYTHON_USEDEP}]
- ' python3_{7..9} )
- )
-"
-
-# Patch 1 skips a test that does not work inside the emerge environment:
-# pytestqt.exceptions.TimeoutError: widget <PyQt5.QtWidgets.QWidget object at 0x7f57d8527af8> not activated in 1000 ms.
-# Patch 2 fixes upstream bug 314
-PATCHES=(
- "${FILESDIR}/${P}-skip-show-window-test.patch"
- "${FILESDIR}/${P}-fix-file-match-test.patch"
-)
-
-distutils_enable_tests pytest
-distutils_enable_sphinx docs dev-python/sphinx_rtd_theme
-
-python_prepare_all() {
- # This is not going to work since we want to test both implementations
- # and therefore pull in both and explicitly set PYTEST_QT_API
- sed -i -e 's:test_qt_api_ini_config_with_envvar:_&:' \
- -e 's:test_qt_api_ini_config:_&:' \
- tests/test_basics.py || die
-
- distutils-r1_python_prepare_all
-}
-
-src_test() {
- virtx python_foreach_impl python_test
-}
-
-python_test() {
- distutils_install_for_testing
- PYTEST_QT_API="pyqt5" epytest
- if [[ "${EPYTHON}" == "python3.10" ]]; then
- return
- else
- PYTEST_QT_API="pyside2" epytest
- fi
-}
diff --git a/dev-python/pytest-qt/pytest-qt-4.0.2-r1.ebuild b/dev-python/pytest-qt/pytest-qt-4.0.2-r1.ebuild
index 11a6bd58b0a3..cddbe0810ddd 100644
--- a/dev-python/pytest-qt/pytest-qt-4.0.2-r1.ebuild
+++ b/dev-python/pytest-qt/pytest-qt-4.0.2-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{8..11} )
inherit distutils-r1 virtualx
@@ -22,7 +22,9 @@ RDEPEND="dev-python/QtPy[gui,testlib,widgets(+),${PYTHON_USEDEP}]"
BDEPEND="
test? (
dev-python/PyQt5[gui,testlib,widgets,${PYTHON_USEDEP}]
- dev-python/pyside2[gui,testlib,widgets,${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/pyside2[gui,testlib,widgets,${PYTHON_USEDEP}]
+ ' python3_{8..10} )
)
"
@@ -50,5 +52,8 @@ python_test() {
)
PYTEST_QT_API="pyqt5" epytest || die
- PYTEST_QT_API="pyside2" epytest || die
+ # Pyside2 is not compatible with python3.11
+ if [[ "${EPYTHON}" != python3.11 ]]; then
+ PYTEST_QT_API="pyside2" epytest || die
+ fi
}
diff --git a/dev-python/pytest-qt/pytest-qt-4.1.0.ebuild b/dev-python/pytest-qt/pytest-qt-4.1.0.ebuild
new file mode 100644
index 000000000000..69dbc6a6d79f
--- /dev/null
+++ b/dev-python/pytest-qt/pytest-qt-4.1.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..11} )
+PYSIDE2_COMPAT=( python3_{8..10} )
+
+inherit distutils-r1 virtualx
+
+DESCRIPTION="Pytest plugin for PyQt5 and PySide2 applications"
+HOMEPAGE="
+ https://pypi.org/project/pytest-qt/
+ https://github.com/pytest-dev/pytest-qt/
+"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+RDEPEND="
+ dev-python/QtPy[gui,testlib,widgets(+),${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/PyQt5[gui,testlib,widgets,${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/pyside2[gui,testlib,widgets,${PYTHON_USEDEP}]
+ ' "${PYSIDE2_COMPAT[@]}")
+ )
+"
+
+distutils_enable_tests pytest
+distutils_enable_sphinx docs dev-python/sphinx_rtd_theme
+
+src_test() {
+ virtx distutils-r1_src_test
+}
+
+python_test() {
+ # warnings from other plugins cause the test output matchers to fail
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local -x PYTEST_PLUGINS=pytestqt.plugin
+
+ local EPYTEST_DESELECT=(
+ # requires the window to be activated; that doesn't seem
+ # to be possible inside Xvfb
+ "tests/test_basics.py::test_wait_window[waitActive-True]"
+
+ # we are forcing a specific module via envvar, effectively
+ # overriding the config
+ tests/test_basics.py::test_qt_api_ini_config
+ tests/test_basics.py::test_qt_api_ini_config_with_envvar
+ )
+
+ einfo "Testing with PyQt5"
+ PYTEST_QT_API="pyqt5" epytest || die
+ # Pyside2 is not compatible with python3.11
+ if has "${EPYTHON}" "${PYSIDE2_COMPAT[@]/_/.}"; then
+ einfo "Testing with PySide2"
+ PYTEST_QT_API="pyside2" epytest || die
+ fi
+}