Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-qt/
Date: Sun, 20 Feb 2022 16:33:10
Message-Id: 1645374782.002ae3be977b918b3684368766d655a8bc16927c.mgorny@gentoo
1 commit: 002ae3be977b918b3684368766d655a8bc16927c
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 20 16:27:36 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 20 16:33:02 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=002ae3be
7
8 dev-python/pytest-qt: Switch to EPYTEST_DESELECT
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pytest-qt/pytest-qt-4.0.2.ebuild | 25 +++++++++++--------------
13 1 file changed, 11 insertions(+), 14 deletions(-)
14
15 diff --git a/dev-python/pytest-qt/pytest-qt-4.0.2.ebuild b/dev-python/pytest-qt/pytest-qt-4.0.2.ebuild
16 index 42c994fad350..c3f929813750 100644
17 --- a/dev-python/pytest-qt/pytest-qt-4.0.2.ebuild
18 +++ b/dev-python/pytest-qt/pytest-qt-4.0.2.ebuild
19 @@ -30,20 +30,6 @@ BDEPEND="
20 distutils_enable_tests --install pytest
21 distutils_enable_sphinx docs dev-python/sphinx_rtd_theme
22
23 -python_prepare_all() {
24 - # This show window test does not work inside the emerge env, as we cannot show windows.
25 - # pytestqt.exceptions.TimeoutError: widget <PyQt5.QtWidgets.QWidget object at 0x7f57d8527af8> not activated in 1000 ms.
26 - sed -i -e 's:test_wait_window:_&:' tests/test_basics.py || die
27 -
28 - # This is not going to work since we want to test both implementations
29 - # and therefore pull in both and explicitly set PYTEST_QT_API
30 - sed -i -e 's:test_qt_api_ini_config_with_envvar:_&:' \
31 - -e 's:test_qt_api_ini_config:_&:' \
32 - tests/test_basics.py || die
33 -
34 - distutils-r1_python_prepare_all
35 -}
36 -
37 src_test() {
38 virtx distutils-r1_src_test
39 }
40 @@ -53,6 +39,17 @@ python_test() {
41 local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
42 local -x PYTEST_PLUGINS=pytestqt.plugin
43
44 + local EPYTEST_DESELECT=(
45 + # requires the window to be activated; that doesn't seem
46 + # to be possible inside Xvfb
47 + "tests/test_basics.py::test_wait_window[waitActive-True]"
48 +
49 + # we are forcing a specific module via envvar, effectively
50 + # overriding the config
51 + tests/test_basics.py::test_qt_api_ini_config
52 + tests/test_basics.py::test_qt_api_ini_config_with_envvar
53 + )
54 +
55 distutils_install_for_testing
56 PYTEST_QT_API="pyqt5" epytest || die
57 if [[ "${EPYTHON}" == "python3.10" ]]; then