commit:     9b6edb1bbe2f8f12c824e707fd199a983fbfd9ed
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri May 20 03:20:48 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 20 03:20:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b6edb1b

app-text/nfoview: simplify test machinery

- Only spawn virtx once for tests
- Use EPYTEST_DESELECT
- Avoid nonfatal trap with virtx/epytest/die [0]

[0] 
https://projects.gentoo.org/python/guide/distutils.html#running-tests-with-virtualx

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-text/nfoview/nfoview-1.28.1.ebuild | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/app-text/nfoview/nfoview-1.28.1.ebuild 
b/app-text/nfoview/nfoview-1.28.1.ebuild
index 931ecf18db47..6fbe3ae73b90 100644
--- a/app-text/nfoview/nfoview-1.28.1.ebuild
+++ b/app-text/nfoview/nfoview-1.28.1.ebuild
@@ -29,12 +29,13 @@ RDEPEND="${DEPEND}
        media-fonts/cascadia-code
        x11-libs/gtk+:3[introspection]"
 
+EPYTEST_DESELECT=(
+       "nfoview/test/test_util.py::TestModule::test_show_uri__unix"
+       "nfoview/test/test_util.py::TestModule::test_show_uri__windows"
+)
+
 distutils_enable_tests pytest
 
-python_test() {
-       local deselect=(
-               --deselect 
'nfoview/test/test_util.py::TestModule::test_show_uri__unix'
-               --deselect 
'nfoview/test/test_util.py::TestModule::test_show_uri__windows'
-       )
-       virtx epytest "${deselect[@]}"
+src_test() {
+       virtx distutils-r1_src_test
 }

Reply via email to