[Pkg-bitcoin-commits] [python-quamash] 54/78: get rid of primitive subprocess tests (since they don't work)

Jonas Smedegaard dr at jones.dk
Tue Dec 19 01:19:55 UTC 2017


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

js pushed a commit to annotated tag debian/0.6.0_dfsg-1
in repository python-quamash.

commit f670857e5a282420a56bd42501cbad96ca9c01c2
Author: Mark Thomas West Harviston <mark.harviston at gmail.com>
Date:   Sun Nov 19 17:19:18 2017 -0800

    get rid of primitive subprocess tests (since they don't work)
---
 tests/test_qeventloop.py | 36 ------------------------------------
 1 file changed, 36 deletions(-)

diff --git a/tests/test_qeventloop.py b/tests/test_qeventloop.py
index a7098c7..b86e8c2 100644
--- a/tests/test_qeventloop.py
+++ b/tests/test_qeventloop.py
@@ -17,20 +17,6 @@ import quamash
 import pytest
 
 
-class _SubprocessProtocol(asyncio.SubprocessProtocol):
-	def __init__(self, *args, **kwds):
-		super(_SubprocessProtocol, self).__init__(*args, **kwds)
-		self.received_stdout = None
-
-	def pipe_data_received(self, fd, data):
-		text = data.decode(locale.getpreferredencoding(False))
-		if fd == 1:
-			self.received_stdout = text.strip()
-
-	def process_exited(self):
-		asyncio.get_event_loop().stop()
-
-
 @pytest.fixture
 def loop(request, application):
 	lp = quamash.QEventLoop(application)
@@ -139,17 +125,6 @@ class TestCanRunTasksInExecutor:
 		logging.debug('start blocking task()')
 
 
-def test_can_execute_subprocess_primitive(loop):
-	"""Verify that a subprocess can be executed using low-level api."""
-	transport, protocol = loop.run_until_complete(
-		loop.subprocess_exec(
-			_SubprocessProtocol, sys.executable or 'python', '-c', 'import sys; sys.exit(5)',
-		),
-	)
-	loop.run_forever()
-	assert transport.get_returncode() == 5
-
-
 def test_can_execute_subprocess(loop):
 	"""Verify that a subprocess can be executed."""
 	@asyncio.coroutine
@@ -161,17 +136,6 @@ def test_can_execute_subprocess(loop):
 	loop.run_until_complete(asyncio.wait_for(mycoro(), timeout=3))
 
 
-def test_can_read_subprocess_primitive(loop):
-	transport, protocol = loop.run_until_complete(
-		loop.subprocess_exec(
-			_SubprocessProtocol, sys.executable or 'python', '-c', 'print("Hello async world!")',
-		),
-	)
-	loop.run_forever()
-	assert transport.get_returncode() == 0
-	assert protocol.received_stdout == "Hello async world!"
-
-
 def test_can_read_subprocess(loop):
 	"""Verify that a subprocess's data can be read from stdout."""
 	@asyncio.coroutine

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