mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-31 07:10:30 +00:00
add write
This commit is contained in:
parent
881b356ce8
commit
731745ae0f
@ -1136,8 +1136,9 @@ def test_class_attribute_types() -> None:
|
|||||||
m.Point.x = 1.0
|
m.Point.x = 1.0
|
||||||
assert m.Point.x == 1.0
|
assert m.Point.x == 1.0
|
||||||
|
|
||||||
|
m.Point.x = 3.0
|
||||||
point = m.Point()
|
point = m.Point()
|
||||||
assert point.x == 1.0
|
assert point.x == 3.0
|
||||||
|
|
||||||
point.dict_str_int["hi"] = 3
|
point.dict_str_int["hi"] = 3
|
||||||
assert m.Point().dict_str_int == {"hi": 3}
|
assert m.Point().dict_str_int == {"hi": 3}
|
||||||
|
Loading…
Reference in New Issue
Block a user