summaryrefslogtreecommitdiff
path: root/tests/testutils.py
diff options
context:
space:
mode:
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
+