[Pkg-bitcoin-commits] [python-quamash] 239/269: parametrize & xfail the tests

Jonas Smedegaard dr at jones.dk
Fri Nov 24 11:26:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository python-quamash.

commit 3e241f47f3eab7172080ba7c477c4070f8ce7c85
Author: Mark Harviston <Mark.T.Harviston.-ND at disney.com>
Date:   Wed Jul 1 13:54:44 2015 -0700

    parametrize & xfail the tests
---
 tests/test_qeventloop.py | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/tests/test_qeventloop.py b/tests/test_qeventloop.py
index 38df522..7fadb24 100644
--- a/tests/test_qeventloop.py
+++ b/tests/test_qeventloop.py
@@ -690,12 +690,16 @@ def test_scheduling(loop, sock_pair):
 	loop.run_until_complete(cb_called)
 
 
-def test_exception_handler(application):
+ at pytest.mark.parametrize('use_quamash',
+	[pytest.mark.xfail(True, reason="bug34"), False]
+)
+def test_exception_handler(use_quamash, loop):
 	handler_called = False
 	coro_run = False
-	loop = quamash.QEventLoop(application)
+	if not use_quamash:
+		loop = asyncio.new_event_loop()
+		asyncio.set_event_loop(loop)
 	loop.set_debug(True)
-	asyncio.set_event_loop(loop)
 
 	@asyncio.coroutine
 	def future_except():
@@ -709,18 +713,15 @@ def test_exception_handler(application):
 		handler_called = True
 
 	loop.set_exception_handler(exct_handler)
-	fut = asyncio.async(future_except())
+	asyncio.async(future_except())
 	loop.run_forever()
 
 	assert coro_run
 	assert handler_called
 
 
-def test_exception_handler_simple(application):
+def test_exception_handler_simple(loop):
 	handler_called = False
-	loop = quamash.QEventLoop(application)
-	loop.set_debug(True)
-	asyncio.set_event_loop(loop)
 
 	def exct_handler(loop, data):
 		nonlocal handler_called

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/python-quamash.git



More information about the Pkg-bitcoin-commits mailing list