commit: e2675dd4fd44f7b6799759d4febf6c48561b1d31
Author: Sam James gentoo org>
AuthorDate: Sun May 28 22:50:10 2023 +
Commit: Sam James gentoo org>
CommitDate: Sun May 28 22:50:49 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2675dd4
dev-python/tornado: add test suite tweaks
- Skip tests marked as skipOnTravis (timing sensitive)
- Explicitly set NO_NETWORK too to avoid network tests
- Don't treat DeprecationWarning as fatal for tests (grabbed from Fedora)
Signed-off-by: Sam James gentoo.org>
.../files/tornado-6.3.2-ignore-deprecationwarning.patch | 12
dev-python/tornado/tornado-6.3.2.ebuild | 8 +++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git
a/dev-python/tornado/files/tornado-6.3.2-ignore-deprecationwarning.patch
b/dev-python/tornado/files/tornado-6.3.2-ignore-deprecationwarning.patch
new file mode 100644
index ..7a6139173faf
--- /dev/null
+++ b/dev-python/tornado/files/tornado-6.3.2-ignore-deprecationwarning.patch
@@ -0,0 +1,12 @@
+https://src.fedoraproject.org/rpms/python-tornado/raw/rawhide/f/Do-not-turn-DeprecationWarning-into-Exception.patch
+--- a/tornado/test/runtests.py
b/tornado/test/runtests.py
+@@ -126,7 +126,6 @@
+ # Tornado generally shouldn't use anything deprecated, but some of
+ # our dependencies do (last match wins).
+ warnings.filterwarnings("ignore", category=DeprecationWarning)
+-warnings.filterwarnings("error", category=DeprecationWarning,
module=r"tornado\..*")
+ warnings.filterwarnings("ignore", category=PendingDeprecationWarning)
+ warnings.filterwarnings(
+ "error", category=PendingDeprecationWarning, module=r"tornado\..*"
+
diff --git a/dev-python/tornado/tornado-6.3.2.ebuild
b/dev-python/tornado/tornado-6.3.2.ebuild
index 6f7c89f5d33a..aa07dcb6f320 100644
--- a/dev-python/tornado/tornado-6.3.2.ebuild
+++ b/dev-python/tornado/tornado-6.3.2.ebuild
@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9..11} pypy3 )
+PYTHON_COMPAT=( python3_{10..11} pypy3 )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1 pypi
@@ -37,6 +37,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-6.3.2-test-timeout-increase.patch
+ "${FILESDIR}"/${PN}-6.3.2-ignore-deprecationwarning.patch
)
src_prepare() {
@@ -49,6 +50,11 @@ src_prepare() {
python_test() {
local -x ASYNC_TEST_TIMEOUT=60
+ # Avoid time-sensitive tests
+ #
https://github.com/tornadoweb/tornado/blob/10974e6ebee80a26a2a65bb9bd715cf858fafde5/tornado/test/util.py#L19
+ local -x TRAVIS=1
+ local -x NO_NETWORK=1
+
cd "${T}" || die
"${EPYTHON}" -m tornado.test.runtests --verbose ||
die "tests failed under ${EPYTHON}"