Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions robotpy_build/include/robotpy_build.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ namespace rpygen {
struct EmptyTrampolineCfg {};
};

// robotpy-build specific extensions waiting for inclusion into pybind11
namespace rpybuild_ext {
using py::raise_from;
} // namespace rpybuild_ext

#define RPYBUILD_BAD_TRAMPOLINE \
"has an abstract trampoline -- and they must never be abstract! One of " \
"the generated override methods doesn't match the original class or its " \
Expand Down
4 changes: 0 additions & 4 deletions tests/cpp/rpytest/ft/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@
fnSimpleDefaultParam,
get123,
important_retval,
raise_from,
raise_from_already_set,
subpkg,
)

Expand Down Expand Up @@ -232,8 +230,6 @@
"fnSimpleDefaultParam",
"get123",
"important_retval",
"raise_from",
"raise_from_already_set",
"subpkg",
]

Expand Down
16 changes: 0 additions & 16 deletions tests/cpp/rpytest/ft/src/ft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,4 @@
RPYBUILD_PYBIND11_MODULE(m)
{
initWrapper(m);

m.def("raise_from", []() {
PyErr_SetString(PyExc_ValueError, "inner");
rpybuild_ext::raise_from(PyExc_ValueError, "outer");
throw py::error_already_set();
});

m.def("raise_from_already_set", []() {
try {
PyErr_SetString(PyExc_ValueError, "inner");
throw py::error_already_set();
} catch (py::error_already_set& e) {
rpybuild_ext::raise_from(e, PyExc_ValueError, "outer");
throw py::error_already_set();
}
});
}
19 changes: 0 additions & 19 deletions tests/test_ft_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,6 @@
import pytest
import re

#
# main module
#


def test_raise_from():
with pytest.raises(ValueError) as excinfo:
ft.raise_from()
assert str(excinfo.value) == "outer"
assert str(excinfo.value.__cause__) == "inner"


def test_raise_from_already_set():
with pytest.raises(ValueError) as excinfo:
ft.raise_from_already_set()
assert str(excinfo.value) == "outer"
assert str(excinfo.value.__cause__) == "inner"


#
# abstract.h
#
Expand Down