summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-07-25 10:39:58 +0200
committerMichał Górny <mgorny@gentoo.org>2021-07-25 10:41:34 +0200
commit0a7b0f4e728fae4449d2872fe0a3d8d7820381fe (patch)
treeea60da6e6d15d9a181799e78b22872fd08b266bc /dev-python
parentdev-python/pyscard: Remove old (diff)
downloadgentoo-0a7b0f4e728fae4449d2872fe0a3d8d7820381fe.tar.gz
gentoo-0a7b0f4e728fae4449d2872fe0a3d8d7820381fe.tar.bz2
gentoo-0a7b0f4e728fae4449d2872fe0a3d8d7820381fe.zip
dev-python/sqlalchemy: Skip some tests if greenlet is not installed
Reported by Dakon. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/sqlalchemy/sqlalchemy-1.4.20.ebuild26
-rw-r--r--dev-python/sqlalchemy/sqlalchemy-1.4.22.ebuild26
2 files changed, 50 insertions, 2 deletions
diff --git a/dev-python/sqlalchemy/sqlalchemy-1.4.20.ebuild b/dev-python/sqlalchemy/sqlalchemy-1.4.20.ebuild
index 2af55cf93bd6..d3f78cc80f26 100644
--- a/dev-python/sqlalchemy/sqlalchemy-1.4.20.ebuild
+++ b/dev-python/sqlalchemy/sqlalchemy-1.4.20.ebuild
@@ -44,8 +44,32 @@ src_prepare() {
}
python_test() {
+ local deselect=()
+ if [[ ${EPYTHON} != pypy3 ]] &&
+ ! has_version -b "dev-python/greenlet[${PYTHON_USEDEP}]"
+ then
+ # skip tests requiring greenlet
+ deselect+=(
+ test/base/test_concurrency_py3k.py::TestAsyncAdaptedQueue::test_lazy_init
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_async_error
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_await_fallback_error
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_await_only_error
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_await_only_no_greenlet
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_contextvars
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_ok
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_propagate_cancelled
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_require_await
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_sync_error
+ test/ext/asyncio/test_engine_py3k.py::TextSyncDBAPI::test_sync_driver_execution
+ test/ext/asyncio/test_engine_py3k.py::TextSyncDBAPI::test_sync_driver_run_sync
+ test/base/test_concurrency_py3k.py::TestAsyncAdaptedQueue::test_error_other_loop
+ test/engine/test_pool.py::PoolEventsTest::test_checkin_event_gc[True-_exclusions0]
+ test/engine/test_pool.py::QueuePoolTest::test_userspace_disconnectionerror_weakref_finalizer[True-_exclusions0]
+ )
+ fi
+
# Disable tests hardcoding function call counts specific to Python versions.
- epytest --ignore test/aaa_profiling \
+ epytest --ignore test/aaa_profiling ${deselect[@]/#/--deselect } \
-n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")"
}
diff --git a/dev-python/sqlalchemy/sqlalchemy-1.4.22.ebuild b/dev-python/sqlalchemy/sqlalchemy-1.4.22.ebuild
index 144d57d9ca1b..6203e2c692f8 100644
--- a/dev-python/sqlalchemy/sqlalchemy-1.4.22.ebuild
+++ b/dev-python/sqlalchemy/sqlalchemy-1.4.22.ebuild
@@ -44,8 +44,32 @@ src_prepare() {
}
python_test() {
+ local deselect=()
+ if [[ ${EPYTHON} != pypy3 ]] &&
+ ! has_version -b "dev-python/greenlet[${PYTHON_USEDEP}]"
+ then
+ # skip tests requiring greenlet
+ deselect+=(
+ test/base/test_concurrency_py3k.py::TestAsyncAdaptedQueue::test_lazy_init
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_async_error
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_await_fallback_error
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_await_only_error
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_await_only_no_greenlet
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_contextvars
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_ok
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_propagate_cancelled
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_require_await
+ test/base/test_concurrency_py3k.py::TestAsyncioCompat::test_sync_error
+ test/ext/asyncio/test_engine_py3k.py::TextSyncDBAPI::test_sync_driver_execution
+ test/ext/asyncio/test_engine_py3k.py::TextSyncDBAPI::test_sync_driver_run_sync
+ test/base/test_concurrency_py3k.py::TestAsyncAdaptedQueue::test_error_other_loop
+ test/engine/test_pool.py::PoolEventsTest::test_checkin_event_gc[True-_exclusions0]
+ test/engine/test_pool.py::QueuePoolTest::test_userspace_disconnectionerror_weakref_finalizer[True-_exclusions0]
+ )
+ fi
+
# Disable tests hardcoding function call counts specific to Python versions.
- epytest --ignore test/aaa_profiling \
+ epytest --ignore test/aaa_profiling ${deselect[@]/#/--deselect } \
-n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")"
}