commit: 429c9f746ef78716fc8805a87f06ec78828149b7
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 24 05:10:06 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun 24 05:16:29 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=429c9f74
dev-python/uvicorn: Skip test using watchfiles conditionally
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/uvicorn/uvicorn-0.18.1.ebuild | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/dev-python/uvicorn/uvicorn-0.18.1.ebuild
b/dev-python/uvicorn/uvicorn-0.18.1.ebuild
index 3c0926979406..de246a78f9d4 100644
--- a/dev-python/uvicorn/uvicorn-0.18.1.ebuild
+++ b/dev-python/uvicorn/uvicorn-0.18.1.ebuild
@@ -37,18 +37,25 @@ BDEPEND="
distutils_enable_tests pytest
-EPYTEST_DESELECT=(
- # too long path for unix socket
- tests/test_config.py::test_bind_unix_socket_works_with_reload_or_workers
- # need unpackaged httptools
-
"tests/middleware/test_logging.py::test_trace_logging_on_http_protocol[httptools]"
- tests/protocols/test_http.py::test_fragmentation
-)
-
-EPYTEST_IGNORE=(
- # needs watchfiles, which in turn needs maturin, which needs rust
- tests/supervisors/test_reload.py
-)
+python_test() {
+ local EPYTEST_DESELECT=(
+ # too long path for unix socket
+
tests/test_config.py::test_bind_unix_socket_works_with_reload_or_workers
+ # need unpackaged httptools
+
"tests/middleware/test_logging.py::test_trace_logging_on_http_protocol[httptools]"
+ tests/protocols/test_http.py::test_fragmentation
+ )
+
+ local EPYTEST_IGNORE=()
+ # love from Rust world
+ if ! has_version "dev-python/watchfiles[${PYTHON_USEDEP}]"; then
+ EPYTEST_IGNORE+=(
+ tests/supervisors/test_reload.py
+ )
+ fi
+
+ epytest
+}
pkg_postinst() {
optfeature "auto reload on file changes" dev-python/watchfiles