1from pybind11_tests import union_ as m 2 3 4def test_union(): 5 instance = m.TestUnion() 6 7 instance.as_uint = 10 8 assert instance.as_int == 10 9