diff options
author | Ray Holder <ray@blacklocus.com> | 2013-03-20 01:57:21 -0500 |
---|---|---|
committer | Ray Holder <ray@blacklocus.com> | 2013-03-20 01:57:21 -0500 |
commit | c88af28dc11b52c471d2d0bbf1ce1a8418c8aa39 (patch) | |
tree | 56f44c6462656208d41d30cb6406be4c37c69757 | |
parent | 8035a32c1bb8f80150498017b1e35815b01790e9 (diff) | |
download | retrying-c88af28dc11b52c471d2d0bbf1ce1a8418c8aa39.tar.gz |
add note about Python 2.x/3.x compatibility and patch up test suite to run under Python 3
-rw-r--r-- | test_retrying.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test_retrying.py b/test_retrying.py index bfb311b..0248d52 100644 --- a/test_retrying.py +++ b/test_retrying.py @@ -162,11 +162,16 @@ class NoNameErrorAfterCount: raise NameError() return True -class CustomError: +class CustomError(Exception): """ - This is a custom exception class that doesn't inherit from any of the Python base Exception hierarchy. + This is a custom exception class. Note that For Python 2.x, we don't + strictly need to extend BaseException, however, Python 3.x will complain. + While this test suite won't run correctly under Python 3.x without + extending from the Python exception hierarchy, the actual module code is + backwards compatible Python 2.x and will allow for cases where exception + classes don't extend from the hierarchy. """ - + def __init__(self, value): self.value = value |