Ejemplo n.º 1
0
def test_get_ls_tree_line_submodule():
    files = []
    symlinkFilenames = []
    symlinkObjects = []
    read_ls_tree_line("""160000 commit fcafd17fbfa44495c7f5f8a0777e5ab610b09500       -	code/facedistid_analysis""",
                      files, symlinkFilenames, symlinkObjects)
    assert files == []
    assert symlinkFilenames == []
    assert symlinkObjects == []
Ejemplo n.º 2
0
def test_get_ls_tree_line_ignored():
    files = []
    symlinkFilenames = []
    symlinkObjects = []
    read_ls_tree_line("""100644 blob a786c385bd1812410d01177affb6ce834d85facd     459	.gitattributes""",
                      files, symlinkFilenames, symlinkObjects)
    assert files == []
    assert symlinkFilenames == []
    assert symlinkObjects == []
Ejemplo n.º 3
0
def test_get_ls_tree_line_annexed():
    files = []
    symlinkFilenames = []
    symlinkObjects = []
    read_ls_tree_line("""120000 blob 570cb4a3fd80de6e8491312c935bfe8029066361     141	derivatives/mriqc/reports/sub-01_ses-01_T1w.html""",
                      files, symlinkFilenames, symlinkObjects)
    assert files == []
    assert symlinkFilenames == [
        'derivatives/mriqc/reports/sub-01_ses-01_T1w.html']
    assert symlinkObjects == ['570cb4a3fd80de6e8491312c935bfe8029066361']
Ejemplo n.º 4
0
def test_get_ls_tree_line():
    files = []
    symlinkFilenames = []
    symlinkObjects = []
    read_ls_tree_line("""100644 blob a786c385bd1812410d01177affb6ce834d85facd     459	dataset_description.json""",
                      files, symlinkFilenames, symlinkObjects)
    assert files == [
        {'filename': 'dataset_description.json',
         'id': '78dd92373749f62af23f3ae499b7a8ac33418fff',
         'key': 'a786c385bd1812410d01177affb6ce834d85facd',
         'size': 459
         }]
    assert symlinkFilenames == []
    assert symlinkObjects == []