diff options
Diffstat (limited to '3rdparty/pybind11/tests/test_copy_move.py')
-rw-r--r-- | 3rdparty/pybind11/tests/test_copy_move.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/3rdparty/pybind11/tests/test_copy_move.py b/3rdparty/pybind11/tests/test_copy_move.py index 7e3cc168..9fef0893 100644 --- a/3rdparty/pybind11/tests/test_copy_move.py +++ b/3rdparty/pybind11/tests/test_copy_move.py @@ -1,5 +1,5 @@ -# -*- coding: utf-8 -*- import pytest + from pybind11_tests import copy_move_policies as m @@ -119,7 +119,14 @@ def test_private_op_new(): def test_move_fallback(): """#389: rvp::move should fall-through to copy on non-movable objects""" - m2 = m.get_moveissue2(2) - assert m2.value == 2 m1 = m.get_moveissue1(1) assert m1.value == 1 + m2 = m.get_moveissue2(2) + assert m2.value == 2 + + +def test_pytype_rvalue_cast(): + """Make sure that cast from pytype rvalue to other pytype works""" + + value = m.get_pytype_rvalue_castissue(1.0) + assert value == 1 |