summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Lange <jml@mumak.net>2015-12-22 17:34:41 +0000
committerJonathan Lange <jml@mumak.net>2015-12-22 17:34:41 +0000
commit47dcaa9399770d7d193f3eedcab6710747851c52 (patch)
treea4673a044ce45dfc57329ecbf8bf1c858b43f4da
parent64a38effb691886b4829a7d527d3fe46eeffaced (diff)
downloadtesttools-47dcaa9399770d7d193f3eedcab6710747851c52.tar.gz
Lint
-rw-r--r--testtools/testsuite.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/testtools/testsuite.py b/testtools/testsuite.py
index 8752218..38bbf89 100644
--- a/testtools/testsuite.py
+++ b/testtools/testsuite.py
@@ -4,12 +4,12 @@
__metaclass__ = type
__all__ = [
- 'ConcurrentTestSuite',
- 'ConcurrentStreamTestSuite',
- 'filter_by_ids',
- 'iterate_tests',
- 'sorted_tests',
- ]
+ 'ConcurrentTestSuite',
+ 'ConcurrentStreamTestSuite',
+ 'filter_by_ids',
+ 'iterate_tests',
+ 'sorted_tests',
+]
import sys
import threading
@@ -104,7 +104,7 @@ class ConcurrentTestSuite(unittest2.TestSuite):
try:
try:
test.run(process_result)
- except Exception as e:
+ except Exception:
# The run logic itself failed.
case = testtools.ErrorHolder(
"broken-runner",
@@ -188,7 +188,7 @@ class ConcurrentStreamTestSuite(object):
try:
try:
test.run(process_result)
- except Exception as e:
+ except Exception:
# The run logic itself failed.
case = testtools.ErrorHolder(
"broken-runner-'%s'" % (route_code,),
@@ -221,8 +221,7 @@ def _flatten_tests(suite_or_case, unpack_outer=False):
except TypeError:
# Not iterable, assume it's a test case.
return [(suite_or_case.id(), suite_or_case)]
- if (type(suite_or_case) in (unittest.TestSuite,) or
- unpack_outer):
+ if (type(suite_or_case) in (unittest.TestSuite,) or unpack_outer):
# Plain old test suite (or any others we may add).
result = []
for test in tests:
@@ -244,7 +243,7 @@ def _flatten_tests(suite_or_case, unpack_outer=False):
def filter_by_ids(suite_or_case, test_ids):
"""Remove tests from suite_or_case where their id is not in test_ids.
-
+
:param suite_or_case: A test suite or test case.
:param test_ids: Something that supports the __contains__ protocol.
:return: suite_or_case, unless suite_or_case was a case that itself