diff options
author | Chris Withers <chris@simplistix.co.uk> | 2014-02-18 20:55:00 +0000 |
---|---|---|
committer | Chris Withers <chris@simplistix.co.uk> | 2014-02-18 20:55:00 +0000 |
commit | e60266c4c5273807f3a097b4a10c437f0ce079c5 (patch) | |
tree | 1dba32c2661d02760cb9e940097df086adad4d9a /tests/testutils.py | |
parent | bae508ffa65dae9d99ccb9e4acd6c47109a9d3a6 (diff) | |
download | psycopg2-e60266c4c5273807f3a097b4a10c437f0ce079c5.tar.gz |
New implementation of Range sorting that works for Python 2.5 to 3.3, at least.
Diffstat (limited to 'tests/testutils.py')
-rw-r--r-- | tests/testutils.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/testutils.py b/tests/testutils.py index 708dd22..0569ede 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -329,3 +329,13 @@ def script_to_py3(script): f2.close() os.remove(filename) +class py3_raises_typeerror(object): + + def __enter__(self): + pass + + def __exit__(self, type, exc, tb): + if sys.version_info[0] >= 3: + assert type is TypeError + return True + |