Split test_python_types.cpp into builtin_casters, stl and pytypes

This commit is contained in:
Dean Moldovan
2017-06-09 00:44:49 +02:00
parent bdfb50f384
commit 83e328f58c
22 changed files with 1276 additions and 1442 deletions

View File

@@ -1,6 +1,14 @@
import pytest
def test_std_exception(msg):
from pybind11_tests import throw_std_exception
with pytest.raises(RuntimeError) as excinfo:
throw_std_exception()
assert msg(excinfo.value) == "This exception was intentionally thrown."
def test_error_already_set(msg):
from pybind11_tests import throw_already_set