aboutsummaryrefslogtreecommitdiff
path: root/timeout_decorator
diff options
context:
space:
mode:
authorTim Perry <pimterry@gmail.com>2015-01-04 21:48:51 +0000
committerTim Perry <pimterry@gmail.com>2015-01-04 21:48:51 +0000
commit641ac2d30b0eb2239444b022688195ff26bd70b4 (patch)
tree270fa5c84d98022c5db686b8aed55137f11f21d1 /timeout_decorator
parent44fece6c98bc8def8d3950900cf054a23ab4c446 (diff)
downloadtimeout-decorator-641ac2d30b0eb2239444b022688195ff26bd70b4.tar.gz
Make timeout error an assertion error, not just any old exception
This means that timeout failures are considered to be test failures, where a specific assertion (i.e. 'this function takes less than N seconds') has failed, rather than being a random error in the test that may indicate a bug.
Diffstat (limited to 'timeout_decorator')
-rw-r--r--timeout_decorator/timeout_decorator.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/timeout_decorator/timeout_decorator.py b/timeout_decorator/timeout_decorator.py
index e44f544..00c3579 100644
--- a/timeout_decorator/timeout_decorator.py
+++ b/timeout_decorator/timeout_decorator.py
@@ -20,7 +20,7 @@ from functools import wraps
#http://www.saltycrane.com/blog/2010/04/using-python-timeout-decorator-uploading-s3/
-class TimeoutError(Exception):
+class TimeoutError(AssertionError):
def __init__(self, value="Timed Out"):
self.value = value