def print_foo(): print( tags.button("Hello world", class_="hello", some_invalid_tag="hello", events=tags.Events(click="alert('Hello world');")))
def test_boolean_attributes_true(): el = tags.button("Hello world", translate=True, # translate="yes|no" spellcheck=True, # spellcheck="true|false" disabled=True, # disabled="disabled" or omitted entirely ) assert el.render() == \ """<button disabled="disabled" spellcheck="true" translate="yes">Hello world</button>"""