[Pkg-bitcoin-commits] [python-quamash] 206/269: rename TestException to ExceptionTester

Jonas Smedegaard dr at jones.dk
Fri Nov 24 11:26:34 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 9566a7c5a055e62a66ec8e81813a13a0f255fc2f
Author: Mark Harviston <mark.harviston at gmail.com>
Date:   Thu Jan 15 19:24:53 2015 -0800

    rename TestException to ExceptionTester
    
    TestException is recognized as a testcase, so it needs to be named
    something else.
    
    I finally learned about -rw to get information about warnings. (and -rE
    and -rf, etc.)
---
 tests/test_qeventloop.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/test_qeventloop.py b/tests/test_qeventloop.py
index c7529e8..520744b 100644
--- a/tests/test_qeventloop.py
+++ b/tests/test_qeventloop.py
@@ -81,7 +81,7 @@ def executor(request):
 	return exc
 
 
-TestException = type('TestException', (Exception,), {})  # to make flake8 not complain
+ExceptionTester = type('ExceptionTester', (Exception,), {})  # to make flake8 not complain
 
 
 class TestCanRunTasksInExecutor:
@@ -108,7 +108,7 @@ class TestCanRunTasksInExecutor:
 		assert was_invoked.value == 1
 
 	def test_can_handle_exception_in_executor(self, loop, executor):
-		with pytest.raises(TestException) as excinfo:
+		with pytest.raises(ExceptionTester) as excinfo:
 			loop.run_until_complete(asyncio.wait_for(
 				loop.run_in_executor(executor, self.blocking_failure),
 				timeout=3.0,
@@ -119,7 +119,7 @@ class TestCanRunTasksInExecutor:
 	def blocking_failure(self):
 		logging.debug('raising')
 		try:
-			raise TestException('Testing')
+			raise ExceptionTester('Testing')
 		finally:
 			logging.debug('raised!')
 
@@ -212,11 +212,11 @@ def test_can_terminate_subprocess(loop):
 	assert transport.get_returncode() != 0
 
 
- at pytest.mark.raises(TestException)
+ at pytest.mark.raises(ExceptionTester)
 def test_loop_callback_exceptions_bubble_up(loop):
 	"""Verify that test exceptions raised in event loop callbacks bubble up."""
 	def raise_test_exception():
-		raise TestException("Test Message")
+		raise ExceptionTester("Test Message")
 	loop.call_soon(raise_test_exception)
 	loop.run_until_complete(asyncio.sleep(.1))
 

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