[Pkg-bitcoin-commits] [python-quamash] 178/269: Get flake8 to not complain about TestException
Jonas Smedegaard
dr at jones.dk
Fri Nov 24 11:26:29 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 455b9c0f538a2b2fb8e91590e2c6b750b28a6640
Author: Mark Harviston <mark.harviston at gmail.com>
Date: Wed Jan 7 05:01:46 2015 -0800
Get flake8 to not complain about TestException
This solution is somewhat hackish a better solution would be some sort
of #noflake8 commend flag, but alas that does not work with a lot of
relevant flake8 plugins.
---
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 647ec8b..15ecbd2 100644
--- a/tests/test_qeventloop.py
+++ b/tests/test_qeventloop.py
@@ -69,7 +69,9 @@ def executor(request):
request.addfinalizer(exc.shutdown)
return exc
-class TestException(Exception): pass
+
+TestException = type('TestException', (Exception,), {}) # to make flake8 not complain
+
class TestCanRunTasksInExecutor:
"""
--
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