Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.search.tests.test_init::test_types[memory-InMemorySearch-None]
Failed

TEST RESULT

Run At
Jul 2 2021, 2:48 PM
Details
mocker = <pytest_mock.plugin.MockerFixture object at 0x7f07778b6940> class_ = 'memory' expected_class = <class 'swh.search.in_memory.InMemorySearch'>, kwargs = None @pytest.mark.parametrize("class_,expected_class,kwargs", SEARCH_IMPLEMENTATIONS) def test_types(mocker, class_, expected_class, kwargs): """Checks all methods of SearchInterface are implemented by this backend, and that they have the same signature. """ mocker.patch("swh.search.elasticsearch.Elasticsearch") if kwargs: concrete_search = get_search(class_, **kwargs) else: concrete_search = get_search(class_) # Create an instance of the protocol (which cannot be instantiated # directly, so this creates a subclass, then instantiates it) interface = type("_", (SearchInterface,), {})() for meth_name in dir(interface): if meth_name.startswith("_"): continue interface_meth = getattr(interface, meth_name) missing_methods = [] try: concrete_meth = getattr(concrete_search, meth_name) except AttributeError: if not getattr(interface_meth, "deprecated_endpoint", False): # The backend is missing a (non-deprecated) endpoint missing_methods.append(meth_name) continue expected_signature = inspect.signature(interface_meth) actual_signature = inspect.signature(concrete_meth) > assert expected_signature == actual_signature, meth_name E AssertionError: origin_search E assert <Signature (*...ginDict, str]> == <Signature (*...ginDict, str]> E +<Signature (*, url_pattern: Union[str, NoneType] = None, metadata_pattern: Union[str, NoneType] = None, with_visit: bool = False, visit_types: Union[List[str], NoneType] = None, page_token: Union[str, NoneType] = None, min_nb_visits: int = 0, min_last_visit_date: str = '', min_last_eventful_visit_date: str = '', min_last_revision_date: str = '', min_last_release_date: str = '', programming_languages: List[str] = [], licenses: List[str] = [], keywords: List[str] = [], sort_by: List[str] = [], limit: int = 50) -> swh.core.api.classes.PagedResult[swh.search.interface.Mini... E E ...Full output truncated (2 lines hidden), use '-vv' to show .tox/py3/lib/python3.7/site-packages/swh/search/tests/test_init.py:86: AssertionError