summaryrefslogtreecommitdiff
path: root/test_six.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-08-02 16:18:49 -0700
committerBenjamin Peterson <benjamin@python.org>2014-08-02 16:18:49 -0700
commit45f9591d4f546bd2313c3c54104f863663a40ff1 (patch)
tree39ee7e949456ae5f4197eccf9841d8cefe9c9576 /test_six.py
parentc331fccd2dbfe150786a8717f6a2f9ad82a3496f (diff)
downloadsix-git-45f9591d4f546bd2313c3c54104f863663a40ff1.tar.gz
instantiate the exception if the value is None (fixes #86)
Diffstat (limited to 'test_six.py')
-rw-r--r--test_six.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test_six.py b/test_six.py
index a520a83..1536276 100644
--- a/test_six.py
+++ b/test_six.py
@@ -560,6 +560,14 @@ def test_reraise():
assert tp2 is Exception
assert value2 is e
assert get_next(tb3) is tb2
+ try:
+ six.reraise(tp, None, tb)
+ except Exception:
+ tp2, value2, tb2 = sys.exc_info()
+ assert tp2 is Exception
+ assert value2 is not val
+ assert isinstance(value2, Exception)
+ assert tb is get_next(tb2)
def test_print_():