Skip to content

Commit

Permalink
add note about Python 2.x/3.x compatibility and patch up test suite t…
Browse files Browse the repository at this point in the history
…o run under Python 3
  • Loading branch information
rholder committed Mar 20, 2013
1 parent 8035a32 commit c88af28
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test_retrying.py
Expand Up @@ -162,11 +162,16 @@ def go(self):
raise NameError() raise NameError()
return True 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): def __init__(self, value):
self.value = value self.value = value


Expand Down

0 comments on commit c88af28

Please sign in to comment.