Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.algos.test_diff.TestDiffRevisions::test_insert_delete_empty_dirs
Failed

TEST RESULT

Run At
Sep 28 2021, 5:27 PM
Details
self = <swh.storage.tests.algos.test_diff.TestDiffRevisions testMethod=test_insert_delete_empty_dirs> mock_get_dir = <MagicMock name='_get_dir' id='139985357289568'> mock_get_rev = <MagicMock name='_get_rev' id='139985354789384'> def test_insert_delete_empty_dirs(self, mock_get_dir, mock_get_rev): rev_from = "898ff03e1e7925ecde3da66327d3cdc7e07625ba" rev_to = "647c3d381e67490e82cdbbe6c96e46d5e1628ce2" from_dir_model = DirectoryModel() from_dir_model.add_file( b"dir3/file1", "ea15f54ca215e7920c60f564315ebb7f911a5204" ) to_dir_model = DirectoryModel() to_dir_model.add_file(b"dir3/file1", "ea15f54ca215e7920c60f564315ebb7f911a5204") to_dir_model.add_file(b"dir3/dir1/") expected_changes = [ { "type": "insert", "from": None, "from_path": None, > "to": to_dir_model.get_path_data(b"dir3/dir1"), "to_path": b"dir3/dir1", } ] .tox/py3/lib/python3.7/site-packages/swh/storage/tests/algos/test_diff.py:287: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/storage/tests/algos/test_dir_iterator.py:95: in get_path_data return entry.get_path_data(b"/".join(path_parts[1:])) .tox/py3/lib/python3.7/site-packages/swh/storage/tests/algos/test_dir_iterator.py:89: in get_path_data "target": entry["target"], .tox/py3/lib/python3.7/site-packages/swh/storage/tests/algos/test_dir_iterator.py:33: in __getitem__ return hash_to_bytes(directory_identifier(self)) .tox/py3/lib/python3.7/site-packages/swh/model/identifiers.py:52: in directory_identifier return hash_to_hex(model.Directory.from_dict(directory).id) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = <class 'swh.model.model.Directory'> d = <swh.storage.tests.algos.test_dir_iterator.DirectoryModel object at 0x7f50e17cc160> @classmethod def from_dict(cls, d): > d = d.copy() E AttributeError: 'DirectoryModel' object has no attribute 'copy' .tox/py3/lib/python3.7/site-packages/swh/model/model.py:706: AttributeError