aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-aspectlib
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-06-22 20:26:20 -0700
committerKhem Raj <raj.khem@gmail.com>2021-06-24 12:54:18 -0700
commit0b19534f5e1cad8a272978ee8dfe9454220fe158 (patch)
tree8572a4772e73a54f87bdfc7885a33f771331cf8c /meta-python/recipes-devtools/python/python3-aspectlib
parent13fadb1d03085322d317fdcce22ba5bb22bbe76c (diff)
downloadmeta-openembedded-contrib-0b19534f5e1cad8a272978ee8dfe9454220fe158.tar.gz
python3-aspectlib: Add ptests
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-aspectlib')
-rw-r--r--meta-python/recipes-devtools/python/python3-aspectlib/0001-Remove-tornado-6-test-constraint.-Ref-15.patch45
-rw-r--r--meta-python/recipes-devtools/python/python3-aspectlib/run-ptest3
2 files changed, 48 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-aspectlib/0001-Remove-tornado-6-test-constraint.-Ref-15.patch b/meta-python/recipes-devtools/python/python3-aspectlib/0001-Remove-tornado-6-test-constraint.-Ref-15.patch
new file mode 100644
index 0000000000..174f088e9e
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-aspectlib/0001-Remove-tornado-6-test-constraint.-Ref-15.patch
@@ -0,0 +1,45 @@
+From d3ae6ac951cc5bbce29b9c987741e0a557c9b777 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= <contact@ionelmc.ro>
+Date: Sun, 2 May 2021 09:50:43 +0300
+Subject: [PATCH] Remove tornado<6 test constraint. Ref #15.
+
+Upstream-Status: Backport [https://github.com/ionelmc/python-aspectlib/commit/7dccb198dfb426f529b81a28a755f3c02f8b50cb]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/test_integrations_py3.py | 5 ++++-
+ tox.ini | 3 ++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test_integrations_py3.py b/tests/test_integrations_py3.py
+index e025eac..596589d 100644
+--- a/tests/test_integrations_py3.py
++++ b/tests/test_integrations_py3.py
+@@ -36,7 +36,10 @@ def test_decorate_tornado_coroutine():
+ @gen.coroutine
+ @debug.log(print_to=buf, module=False, stacktrace=2, result_repr=repr)
+ def coro():
+- yield gen.Task(loop.add_timeout, timedelta(microseconds=10))
++ if hasattr(gen, 'Task'):
++ yield gen.Task(loop.add_timeout, timedelta(microseconds=10))
++ else:
++ yield gen.sleep(0.01)
+ return "result"
+
+ loop = ioloop.IOLoop.current()
+diff --git a/tox.ini b/tox.ini
+index 8c607de..08c31b3 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -55,7 +55,8 @@ deps =
+ pytest-clarity
+ pytest-cov
+ pytest-travis-fold
+- tornado<6.0
++ six
++ tornado
+ commands =
+ {posargs:pytest --cov --cov-report=term-missing -vv --ignore=src}
+
+--
+2.32.0
+
diff --git a/meta-python/recipes-devtools/python/python3-aspectlib/run-ptest b/meta-python/recipes-devtools/python/python3-aspectlib/run-ptest
new file mode 100644
index 0000000000..b63c4de0d9
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-aspectlib/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'