example_tree = <swh.scanner.model.Tree object at 0x7f2d689e53c8>
temp_folder = {'filesample': PosixPath('/tmp/pytest-of-jenkins/pytest-0/test_get_directories_info0/subdir/filesample.txt'), 'filesam...9a060e54bf8d69288fbee4904', ...}, 'root': PosixPath('/tmp/pytest-of-jenkins/pytest-0/test_get_directories_info0'), ...}
def test_get_directories_info(example_tree, temp_folder):
root_path = temp_folder["root"]
filesample_path = temp_folder["filesample"]
filesample2_path = temp_folder["filesample2"]
subdir_path = temp_folder["subdir"].relative_to(root_path)
subsubdir_path = temp_folder["subsubdir"].relative_to(root_path)
for path, swhid in temp_folder["paths"].items():
if path == filesample_path or path == filesample2_path:
example_tree.add_node(path, swhid, True)
else:
> example_tree.add_node(path, swhid, False)
E TypeError: add_node() takes 3 positional arguments but 4 were given
.tox/py3/lib/python3.7/site-packages/swh/scanner/tests/test_model.py:77: TypeError
TEST RESULT
TEST RESULT
- Run At
- Dec 11 2020, 12:48 PM