Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kanghyojun opened this issue Feb 11, 2018 · 0 comments
Closed
Assignees
Labels
cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) target:python typ:bug Type: Bug/defect

Comments

@kanghyojun
Copy link
Member

kanghyojun commented Feb 11, 2018

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.

@dahlia dahlia added typ:bug Type: Bug/defect cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) target:python labels Feb 12, 2018
@dahlia dahlia self-assigned this Feb 20, 2018
dahlia added a commit to dahlia/nirum that referenced this issue Feb 20, 2018
dahlia added a commit to dahlia/nirum that referenced this issue Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmp:compiler Component: Compiler backend (e.g., annotation processors, code generators) target:python typ:bug Type: Bug/defect
Projects
None yet
Development

No branches or pull requests

2 participants