[Pkg-bitcoin-commits] [python-quamash] 141/269: Improve tests

Jonas Smedegaard dr at jones.dk
Fri Nov 24 11:26:25 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 8058d989851789551465f32176b8c49bbcd2a269
Author: Arve Knudsen <arve.knudsen at gmail.com>
Date:   Sat Dec 6 20:52:42 2014 +0100

    Improve tests
---
 tests/test_qeventloop.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/test_qeventloop.py b/tests/test_qeventloop.py
index d4862d1..2d712e8 100644
--- a/tests/test_qeventloop.py
+++ b/tests/test_qeventloop.py
@@ -342,6 +342,7 @@ def test_add_reader_should_disable_qsocket_notifier_on_callback(loop, sock_pair)
 			assert not notifier.isEnabled()
 			srv_sock.recv(1)
 			fut.set_result(None)
+			srv_sock.close()
 			return
 
 		assert not notifier.isEnabled()
@@ -371,12 +372,13 @@ def test_add_writer_should_disable_qsocket_notifier_on_callback(loop, sock_pair)
 			# this call (although disabled during)
 			assert not notifier.isEnabled()
 			fut.set_result(None)
+			client_sock.close()
 			return
 
 		assert not notifier.isEnabled()
 
 	num_calls = 0
-	client_sock, srv_sock = sock_pair
+	client_sock, _ = sock_pair
 	fut = asyncio.Future()
 	loop.add_writer(client_sock.fileno(), can_write)
 	notifier = loop._write_notifiers[client_sock.fileno()]

-- 
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