mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 06:49:25 +00:00
stl_bind: add binding for std::vector::clear (#2074)
This commit is contained in:
@@ -64,6 +64,9 @@ def test_vector_int():
|
||||
del v_int2[-1]
|
||||
assert v_int2 == m.VectorInt([0, 99, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 88])
|
||||
|
||||
v_int2.clear()
|
||||
assert len(v_int2) == 0
|
||||
|
||||
# related to the PyPy's buffer protocol.
|
||||
@pytest.unsupported_on_pypy
|
||||
def test_vector_buffer():
|
||||
|
||||
Reference in New Issue
Block a user