Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.model.tests.test_model::test_object_type_is_final
Failed

TEST RESULT

Run At
May 15 2020, 10:23 AM
Details
def test_object_type_is_final(): object_types = set() def check_final(cls): if not cls.__subclasses__(): assert cls.object_type not in object_types object_types.add(cls.object_type) else: assert not hasattr(cls, "object_type") for subcls in cls.__subclasses__(): check_final(subcls) > check_final(BaseModel) .tox/py3/lib/python3.7/site-packages/swh/model/tests/test_model.py:461: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/model/tests/test_model.py:459: in check_final check_final(subcls) .tox/py3/lib/python3.7/site-packages/swh/model/tests/test_model.py:459: in check_final check_final(subcls) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = <class 'swh.model.model.Content'> def check_final(cls): if not cls.__subclasses__(): assert cls.object_type not in object_types object_types.add(cls.object_type) else: > assert not hasattr(cls, "object_type") E AssertionError: assert not True E + where True = hasattr(<class 'swh.model.model.Content'>, 'object_type') .tox/py3/lib/python3.7/site-packages/swh/model/tests/test_model.py:457: AssertionError