| 465 | |
| 466 | |
| 467 | def test_array_failure(): |
| 468 | with pytest.raises(ValueError) as excinfo: |
| 469 | m.array_fail_test() |
| 470 | assert str(excinfo.value) == "cannot create a pybind11::array from a nullptr" |
| 471 | |
| 472 | with pytest.raises(ValueError) as excinfo: |
| 473 | m.array_t_fail_test() |
| 474 | assert str(excinfo.value) == "cannot create a pybind11::array_t from a nullptr" |
| 475 | |
| 476 | with pytest.raises(ValueError) as excinfo: |
| 477 | m.array_fail_test_negative_size() |
| 478 | assert str(excinfo.value) == "negative dimensions are not allowed" |
| 479 | |
| 480 | |
| 481 | def test_initializer_list(): |