std::array <-> list
(doc)
| 39 | |
| 40 | |
| 41 | def test_array(doc): |
| 42 | """std::array <-> list""" |
| 43 | lst = m.cast_array() |
| 44 | assert lst == [1, 2] |
| 45 | assert m.load_array(lst) |
| 46 | assert m.load_array(tuple(lst)) |
| 47 | |
| 48 | assert ( |
| 49 | doc(m.cast_array) |
| 50 | == 'cast_array() -> typing.Annotated[list[int], "FixedSize(2)"]' |
| 51 | ) |
| 52 | assert ( |
| 53 | doc(m.load_array) |
| 54 | == 'load_array(arg0: typing.Annotated[collections.abc.Sequence[typing.SupportsInt | typing.SupportsIndex], "FixedSize(2)"]) -> bool' |
| 55 | ) |
| 56 | |
| 57 | |
| 58 | def test_array_no_default_ctor(): |