MCPcopy Create free account
hub / github.com/pybind/pybind11 / test_references_actually_refer

Function test_references_actually_refer

tests/test_eigen_tensor.py:196–208  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

194
195@pytest.mark.parametrize("m", submodules)
196def test_references_actually_refer(m):
197 a = m.reference_tensor()
198 temp = a[indices]
199 a[indices] = 100
200 assert_equal_tensor_ref(m.copy_const_tensor(), modified=100)
201 a[indices] = temp
202 assert_equal_tensor_ref(m.copy_const_tensor())
203
204 a = m.reference_view_of_tensor()
205 a[indices] = 100
206 assert_equal_tensor_ref(m.copy_const_tensor(), modified=100)
207 a[indices] = temp
208 assert_equal_tensor_ref(m.copy_const_tensor())
209
210
211@pytest.mark.parametrize("m", submodules)

Callers

nothing calls this directly

Calls 1

assert_equal_tensor_refFunction · 0.85

Tested by

no test coverage detected