summaryrefslogtreecommitdiff
path: root/ext/pybind11/tests/test_constants_and_functions.py
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pybind11/tests/test_constants_and_functions.py')
-rw-r--r--ext/pybind11/tests/test_constants_and_functions.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/pybind11/tests/test_constants_and_functions.py b/ext/pybind11/tests/test_constants_and_functions.py
index d13d3af1b..2a570d2e5 100644
--- a/ext/pybind11/tests/test_constants_and_functions.py
+++ b/ext/pybind11/tests/test_constants_and_functions.py
@@ -22,3 +22,22 @@ def test_bytes():
from pybind11_tests import return_bytes, print_bytes
assert print_bytes(return_bytes()) == "bytes[1 0 2 0]"
+
+
+def test_exception_specifiers():
+ from pybind11_tests.exc_sp import C, f1, f2, f3, f4
+
+ c = C()
+ assert c.m1(2) == 1
+ assert c.m2(3) == 1
+ assert c.m3(5) == 2
+ assert c.m4(7) == 3
+ assert c.m5(10) == 5
+ assert c.m6(14) == 8
+ assert c.m7(20) == 13
+ assert c.m8(29) == 21
+
+ assert f1(33) == 34
+ assert f2(53) == 55
+ assert f3(86) == 89
+ assert f4(140) == 144