Beispiel #1
0
 def __eq__(self, other: Any) -> bool:
     if isinstance(other, self.__class__):
         return links_equivalent(self._link, other._link)
     return False
Beispiel #2
0
def _match_link(link: Link, candidate: "Candidate") -> bool:
    if candidate.source_link:
        return links_equivalent(link, candidate.source_link)
    return False
Beispiel #3
0
def test_links_equivalent_false(url1, url2):
    assert not links_equivalent(Link(url1), Link(url2))
Beispiel #4
0
def test_links_equivalent(url1, url2):
    assert links_equivalent(Link(url1), Link(url2))
Beispiel #5
0
def test_links_equivalent_false(url1: str, url2: str) -> None:
    assert not links_equivalent(Link(url1), Link(url2))
Beispiel #6
0
def _match_link(link, candidate):
    # type: (Link, Candidate) -> bool
    if candidate.source_link:
        return links_equivalent(link, candidate.source_link)
    return False