diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-06-24 07:10:06 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-06-24 07:16:29 +0200 |
commit | 429c9f746ef78716fc8805a87f06ec78828149b7 (patch) | |
tree | b73b3269a8ad37c22ed173dac9051bfb4a21be12 /dev-python/uvicorn | |
parent | dev-python/pytest-qt: Bump to 4.1.0 (diff) | |
download | gentoo-429c9f746ef78716fc8805a87f06ec78828149b7.tar.gz gentoo-429c9f746ef78716fc8805a87f06ec78828149b7.tar.bz2 gentoo-429c9f746ef78716fc8805a87f06ec78828149b7.zip |
dev-python/uvicorn: Skip test using watchfiles conditionally
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/uvicorn')
-rw-r--r-- | dev-python/uvicorn/uvicorn-0.18.1.ebuild | 31 |
1 files 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 |