summaryrefslogtreecommitdiff
path: root/dev-python/pytest-qt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /dev-python/pytest-qt
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'dev-python/pytest-qt')
-rw-r--r--dev-python/pytest-qt/Manifest5
-rw-r--r--dev-python/pytest-qt/metadata.xml4
-rw-r--r--dev-python/pytest-qt/pytest-qt-4.0.2-r1.ebuild54
-rw-r--r--dev-python/pytest-qt/pytest-qt-4.0.2.ebuild39
4 files changed, 81 insertions, 21 deletions
diff --git a/dev-python/pytest-qt/Manifest b/dev-python/pytest-qt/Manifest
index 2e87a2d082b3..964a2a6b1a83 100644
--- a/dev-python/pytest-qt/Manifest
+++ b/dev-python/pytest-qt/Manifest
@@ -3,5 +3,6 @@ AUX pytest-qt-3.3.0-skip-show-window-test.patch 1318 BLAKE2B 7e1c628c13f02d6219d
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.ebuild 1622 BLAKE2B 52321c17d49d841030a2d4a30d5c9abcab1342e1c5b472f58608be477eef37b465cf628932c2f08ce7311f7064ecf1101e355a3c07969bc4eebf4f1763ff3453 SHA512 45dc99e261ad00befc6ba38a69f23c2fd35997ffc87784ec482578699e334b07744a8c32b2b9f17a15cdc1844baf5e09eea61a4e81b3751b01ea1790fd39a77f
-MISC metadata.xml 415 BLAKE2B cdd4a6d1caeeb482ab19ea6c7442dfc7fe67c3f48504c9daf90df45ebc9e8b5d3d940e510a337545e8746b849995b126f274cf7245b708971c0225dd2947e753 SHA512 2677bd9a735a1a07a30ec8cfc2072e90a94ec144c1f1c95748f8fa8f2aeecd1c5a639048ecea10740911ab14406944e2245a8a6f2f5027999d03b43b6d4c8692
+EBUILD pytest-qt-4.0.2-r1.ebuild 1438 BLAKE2B 601e3c05000b993654b34e5d4a0723f4f05813a1d40f2232d16fa24686d9725922f997235678e4e27def2055baff1a47405747223d93e13f6730837498677e6e SHA512 cba99408b2d80091efe20daad5f15762606bf969d810419a9513ad229f307f3ecefcd05c622b8928016bd79682530859b32e252a0e0b29d738ffda99000cff10
+EBUILD pytest-qt-4.0.2.ebuild 1559 BLAKE2B d30b57baff4a1ca49fe57e4e7f237a1e5e436de325bc5787c569489f5320d8a1ed74789a16a819023ce47c53d3f3446fa55fba7fe1c6772864c2a23964aa2970 SHA512 329ac5e69877480a345569f4863ec6518bbe046930c20693f948b5b3eac99ae00a19fa53386f4e35391fbcebb5aa515995e897e701dd11621afaa64e25715a64
+MISC metadata.xml 516 BLAKE2B be5241e39f672681b27a003d02eca0e047644cad7da57de6b3393f58760c094c1661b9d168e44bea4efd56b38225d49abd5be6e71031a0d854b878716286d3ed SHA512 77981d63d3214fd2c052f8a7eac1a439899318973807299237a9105730893ce01d4423b060f532bd4f4496418683fc5128508c7d8747ba6ee6ed0eae67e5569f
diff --git a/dev-python/pytest-qt/metadata.xml b/dev-python/pytest-qt/metadata.xml
index 9f2fb4bb4df2..4e92ac67dcc4 100644
--- a/dev-python/pytest-qt/metadata.xml
+++ b/dev-python/pytest-qt/metadata.xml
@@ -5,6 +5,10 @@
<email>andrewammerlaan@gentoo.org</email>
<name>Andrew Ammerlaan</name>
</maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
<upstream>
<remote-id type="pypi">pytest-qt</remote-id>
<remote-id type="github">pytest-dev/pytest-qt</remote-id>
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
new file mode 100644
index 000000000000..ce2a9e32d833
--- /dev/null
+++ b/dev-python/pytest-qt/pytest-qt-4.0.2-r1.ebuild
@@ -0,0 +1,54 @@
+# 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..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}]
+ dev-python/pyside2[gui,testlib,widgets,${PYTHON_USEDEP}]
+ )
+"
+
+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
+ )
+
+ PYTEST_QT_API="pyqt5" epytest || die
+ PYTEST_QT_API="pyside2" epytest || die
+}
diff --git a/dev-python/pytest-qt/pytest-qt-4.0.2.ebuild b/dev-python/pytest-qt/pytest-qt-4.0.2.ebuild
index f2e45a6dfdb4..2e1cc477fd82 100644
--- a/dev-python/pytest-qt/pytest-qt-4.0.2.ebuild
+++ b/dev-python/pytest-qt/pytest-qt-4.0.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -15,7 +15,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~x86"
+KEYWORDS="amd64 ~arm64 x86"
RDEPEND="dev-python/QtPy[gui,testlib,widgets(+),${PYTHON_USEDEP}]"
BDEPEND="
@@ -30,30 +30,31 @@ BDEPEND="
distutils_enable_tests --install pytest
distutils_enable_sphinx docs dev-python/sphinx_rtd_theme
-python_prepare_all() {
- # This show window test does not work inside the emerge env, as we cannot show windows.
- # pytestqt.exceptions.TimeoutError: widget <PyQt5.QtWidgets.QWidget object at 0x7f57d8527af8> not activated in 1000 ms.
- sed -i -e 's:test_wait_window:_&:' tests/test_basics.py || die
-
- # 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
+ 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
+ )
+
distutils_install_for_testing
- PYTEST_QT_API="pyqt5" epytest
+ PYTEST_QT_API="pyqt5" epytest || die
if [[ "${EPYTHON}" == "python3.10" ]]; then
return
else
- PYTEST_QT_API="pyside2" epytest
+ PYTEST_QT_API="pyside2" epytest || die
fi
}