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

Comments

Projects
None yet
2 participants
@kanghyojun
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 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

@dahlia dahlia closed this in #238 Feb 21, 2018

dahlia added a commit that referenced this issue Feb 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment