swh_indexer_storage = <swh.indexer.storage.in_memory.IndexerStorage object at 0x7f4b7e790278>
def test_types(swh_indexer_storage) -> None:
"""Checks all methods of StorageInterface are implemented by this
backend, and that they have the same signature."""
# Create an instance of the protocol (which cannot be instantiated
# directly, so this creates a subclass, then instantiates it)
interface = type("_", (IndexerStorageInterface,), {})()
assert "content_mimetype_add" in dir(interface)
missing_methods = []
for meth_name in dir(interface):
if meth_name.startswith("_"):
continue
interface_meth = getattr(interface, meth_name)
try:
concrete_meth = getattr(swh_indexer_storage, meth_name)
except AttributeError:
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: content_ctags_search
E assert <Signature (e...tentCtagsRow]> == <Signature (e...Type] = None)>
E +<Signature (expression: str, limit: int = 10, last_sha1: Union[bytes, NoneType] = None) -> List[swh.indexer.storage.model.ContentCtagsRow]>
E -<Signature (expression: str, limit: int = 10, last_sha1: Union[bytes, NoneType] = None)>
.tox/py3/lib/python3.7/site-packages/swh/indexer/tests/storage/test_storage.py:106: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Oct 7 2020, 1:42 PM