mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-28 16:11:59 +00:00
actually need both tests
This commit is contained in:
parent
4b3f145b94
commit
6fa2bb161e
@ -127,8 +127,12 @@ TEST_SUBMODULE(pytypes, m) {
|
|||||||
m.def("tuple_size_t", []() { return py::tuple{(py::size_t) 0}; });
|
m.def("tuple_size_t", []() { return py::tuple{(py::size_t) 0}; });
|
||||||
m.def("get_tuple", []() { return py::make_tuple(42, py::none(), "spam"); });
|
m.def("get_tuple", []() { return py::make_tuple(42, py::none(), "spam"); });
|
||||||
m.def("access_tuple_with_int_index", []() {
|
m.def("access_tuple_with_int_index", []() {
|
||||||
py::object tpl = py::make_tuple(py::make_tuple(1, 2), py::make_tuple(3, 4));
|
py::object tpl = py::make_tuple(1, 2);
|
||||||
return tpl[0][1];
|
return tpl[1];
|
||||||
|
});
|
||||||
|
m.def("access_tuple_with_int_index_multidimension", []() {
|
||||||
|
py::object tpl = py::make_tuple(py::make_tuple(1, 2, 3), py::make_tuple(3, 4, 5));
|
||||||
|
return tpl[1][2];
|
||||||
});
|
});
|
||||||
|
|
||||||
// test_simple_namespace
|
// test_simple_namespace
|
||||||
|
@ -152,7 +152,8 @@ def test_tuple():
|
|||||||
assert m.tuple_ssize_t() == ()
|
assert m.tuple_ssize_t() == ()
|
||||||
assert m.tuple_size_t() == ()
|
assert m.tuple_size_t() == ()
|
||||||
assert m.get_tuple() == (42, None, "spam")
|
assert m.get_tuple() == (42, None, "spam")
|
||||||
# assert m.access_tuple_with_int_index() == (2)
|
assert m.access_tuple_with_int_index() == 2
|
||||||
|
assert m.access_tuple_with_int_index_multidimension() == 5
|
||||||
|
|
||||||
|
|
||||||
def test_simple_namespace():
|
def test_simple_namespace():
|
||||||
|
Loading…
Reference in New Issue
Block a user