aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/test_der.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hazmat/test_der.py')
-rw-r--r--tests/hazmat/test_der.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/hazmat/test_der.py b/tests/hazmat/test_der.py
index d81c0d3e..d052802c 100644
--- a/tests/hazmat/test_der.py
+++ b/tests/hazmat/test_der.py
@@ -46,6 +46,14 @@ def test_der():
with pytest.raises(ValueError):
reader.check_empty()
+ with pytest.raises(ValueError):
+ with reader:
+ pass
+
+ with pytest.raises(ZeroDivisionError):
+ with DERReader(der):
+ raise ZeroDivisionError
+
# Parse the outer element.
outer = reader.read_element(SEQUENCE)
reader.check_empty()