Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_in_memory.TestInMemoryStorage::test_types
Failed

TEST RESULT

Run At
Apr 7 2021, 4:18 PM
Details
self = <swh.storage.tests.test_in_memory.TestInMemoryStorage object at 0x7f2fb000bd30> swh_storage_backend_config = {'cls': 'memory', 'journal_writer': {'cls': 'memory'}} def test_types(self, swh_storage_backend_config): """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("_", (StorageInterface,), {})() storage = get_storage(**swh_storage_backend_config) assert "content_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(storage, 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: content_add E assert <Signature (c...ent]) -> Dict> == <Signature (c...nt]]) -> Dict> E +<Signature (content: List[swh.model.model.Content]) -> Dict> E -<Signature (contents: Union[List[swh.model.model.Content], ValuesView[swh.model.model.Content]]) -> Dict> .tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:148: AssertionError