mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-03-14 20:27:24 +00:00
Add test test functions for cpp/python exceptions
This commit is contained in:
@@ -725,4 +725,10 @@ PYBIND11_MODULE(_nvbench, m)
|
||||
},
|
||||
"Run all registered benchmarks",
|
||||
py::arg("argv") = py::list());
|
||||
|
||||
m.def("test_cpp_exception", []() { throw nvbench_run_error("Test"); });
|
||||
m.def("test_py_exception", []() {
|
||||
py::set_error(benchmark_exc, "Test");
|
||||
throw py::error_already_set();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user