def test_get_namespaces_v2(name, ns_prefix, ns_uri): n = NSComponentName(name, ns_prefix, ns_uri) assert n.get_namespaces() == {(ns_prefix or '', ns_uri)}
def test_get_namespaces_with_compound_name_v2(name, ns_prefix, sec_ns_prefix, ns_uri): compound_name = sec_ns_prefix + '__' + name n = NSComponentName(compound_name, ns_prefix, ns_uri) assert n.get_namespaces() == {(ns_prefix, ns_uri)}
def test_get_namespaces_v1(name, ns_prefix, ns_uri): n = NSComponentName(name, ns_prefix, ns_uri) namespaces = n.get_namespaces() assert isinstance(namespaces, set) assert namespaces == set()