Skip to content

__nirum_deserialize__ of Union raise KeyError if extra items given. #232

@kanghyojun

Description

@kanghyojun
def test_union_extra_tag():
    n = CultureAgnosticName(fullname=u'foobar')
    serialized = n.__nirum_serialize__()
    serialized.update(wrong='v')
    with raises(ValueError):
        MixedName.__nirum_deserialize__(serialized)

While deserialize union with extra items, it raises unexpected KeyError. See above example.

Metadata

Metadata

Assignees

Labels

cmp:compilerComponent: Compiler backend (e.g., annotation processors, code generators)target:pythontyp:bugType: Bug/defect

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions