def test_option_collation():

    class DerivedStringType(StringType):
        pass

    field = UnionType((IntType, DerivedStringType), required=True, max_value=100, max_length=50)
    assert field.required is True
    assert field._types[IntType].required is True
    assert field._types[DerivedStringType].required is True
    assert field._types[IntType].max_value == 100
    assert field._types[DerivedStringType].max_length == 50
dataset/ETHPy150Open schematics/schematics/tests/test_union_type.py/test_option_collation/original