def popitem(options):
expected = {'<STR_LIT:foo>': '<STR_LIT:bar>', '<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>'}<EOL>actual = {}<EOL>mapping = options.constructor(dict(expected))<EOL>for _ in range(<NUM_LIT:3>):<EOL><INDENT>key, value = mapping.popitem()<EOL>assert_equals(expected[key], value)<EOL>actual[key] = value<EOL><DEDENT>assert_equals(expected, actual)<EOL>assert_raises(AttributeError, lambda: mapping.foo)<EOL>assert_raises(AttributeError, lambda: mapping.lorem)<EOL>assert_raises(AttributeError, lambda: mapping.alpha)<EOL>assert_raises(KeyError, mapping.popitem)<EOL>
Popping items from {cls}