def test_up(self, url_suffix, count, expected_suffix): url_base = 'https://example.com' url = QUrl(url_base + url_suffix) assert url.isValid() new = navigate.path_up(url, count) assert new == QUrl(url_base + expected_suffix)
def test_invalid_url(self): with pytest.raises(urlutils.InvalidUrlError): navigate.path_up(QUrl(), count=1)