def test_protocol_signatures(element): with pytest.raises(ValueError): normalize(element)
def test_unknown(): with pytest.raises(NotImplementedError, match="cannot be represented"): normalize(object)
def test_callable_signatures(typing_type, element): assert typing_type == unparse(normalize(element))
def test_shorthands(typing_type, element): assert typing_type == unparse(normalize(element))
def test_containers(typing_type, element): assert typing_type == unparse(normalize(element))
def test_specials(typing_type, element): assert typing_type == unparse(normalize(element))
def test_terminals(typing_type, element): assert typing_type == unparse(normalize(element))