summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-02-20 17:27:36 +0100
committerMichał Górny <mgorny@gentoo.org>2022-02-20 17:33:02 +0100
commit002ae3be977b918b3684368766d655a8bc16927c (patch)
tree9dd3408db0134ed2fcb4f7b94adf84a33c419cd9 /dev-python/pytest-qt
parentdev-python/pytest-qt: Disable plugin autoloading to fix tests (diff)
downloadgentoo-002ae3be977b918b3684368766d655a8bc16927c.tar.gz
gentoo-002ae3be977b918b3684368766d655a8bc16927c.tar.bz2
gentoo-002ae3be977b918b3684368766d655a8bc16927c.zip
dev-python/pytest-qt: Switch to EPYTEST_DESELECT
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pytest-qt')
-rw-r--r--dev-python/pytest-qt/pytest-qt-4.0.2.ebuild25
1 files changed, 11 insertions, 14 deletions
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 42c994fad350..c3f929813750 100644
--- a/dev-python/pytest-qt/pytest-qt-4.0.2.ebuild
+++ b/dev-python/pytest-qt/pytest-qt-4.0.2.ebuild
@@ -30,20 +30,6 @@ 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 distutils-r1_src_test
}
@@ -53,6 +39,17 @@ python_test() {
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 || die
if [[ "${EPYTHON}" == "python3.10" ]]; then