4 m = pytest.importorskip(
"pybind11_tests.constants_and_functions")
8 assert m.some_constant == 14
12 assert m.test_function() ==
"test_function()" 13 assert m.test_function(7) ==
"test_function(7)" 14 assert m.test_function(m.MyEnum.EFirstEntry) ==
"test_function(enum=1)" 15 assert m.test_function(m.MyEnum.ESecondEntry) ==
"test_function(enum=2)" 17 assert m.test_function() ==
"test_function()" 18 assert m.test_function(
"abcd") ==
"test_function(char *)" 19 assert m.test_function(1, 1.0) ==
"test_function(int, float)" 20 assert m.test_function(1, 1.0) ==
"test_function(int, float)" 21 assert m.test_function(2.0, 2) ==
"test_function(float, int)" 25 assert m.print_bytes(m.return_bytes()) ==
"bytes[1 0 2 0]" 42 assert m.f4(140) == 144
def test_function_overloading()
def test_exception_specifiers()