Change-Id: I52e4fc9ebf2f59da57d8cf8f3e37cc79598c2f5f Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Andreas Hansson <andreas.hansson@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2229 Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr>
16 lines
488 B
Python
16 lines
488 B
Python
import pytest
|
|
|
|
|
|
def test_lacking_copy_ctor():
|
|
from pybind11_tests import lacking_copy_ctor
|
|
with pytest.raises(RuntimeError) as excinfo:
|
|
lacking_copy_ctor.get_one()
|
|
assert "the object is non-copyable!" in str(excinfo.value)
|
|
|
|
|
|
def test_lacking_move_ctor():
|
|
from pybind11_tests import lacking_move_ctor
|
|
with pytest.raises(RuntimeError) as excinfo:
|
|
lacking_move_ctor.get_one()
|
|
assert "the object is neither movable nor copyable!" in str(excinfo.value)
|