summaryrefslogtreecommitdiff
path: root/tests/testutils.py
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2014-02-22 23:02:19 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2014-02-22 23:02:19 +0000
commit283dbccf56d1c3fb14eadc66bdd4e2a4bb56974e (patch)
tree2e691b9fe6ba34336a5e8002037ad2c73c2231f7 /tests/testutils.py
parentdd9e476353b0fd0f10da40204327a951941bc2e4 (diff)
parent8d2744c550fef74c518ef14bd304e0bc880c84c7 (diff)
downloadpsycopg2-283dbccf56d1c3fb14eadc66bdd4e2a4bb56974e.tar.gz
Merge branch 'range_sort'
Diffstat (limited to 'tests/testutils.py')
-rw-r--r--tests/testutils.py10
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
+