Example #1
0
def test_double_level_expand():
    assert set(select.compute('//experiments//files')) == \
        set(['/projects/*/subjects/*/experiments/*/resources/*/files/*',
             '/projects/*/subjects/*/experiments/*/reconstructions/*/in_resources/*/files/*',
             '/projects/*/subjects/*/experiments/*/scans/*/resources/*/files/*',
             '/projects/*/subjects/*/experiments/*/assessors/*/out_resources/*/files/*',
             '/projects/*/subjects/*/experiments/*/assessors/*/in_resources/*/files/*',
             '/projects/*/subjects/*/experiments/*/reconstructions/*/out_resources/*/files/*',
             '/projects/*/subjects/*/experiments/*/assessors/*/resources/*/files/*'])
Example #2
0
def test_compute_all():
    assert set(select.compute('/projects/nosetests//experiments/*Session*//files/myfile.txt')) == \
        set(['/project/nosetests/subjects/*/experiments/*Session*/resources/*/file/myfile.txt',
             '/project/nosetests/subjects/*/experiments/*Session*/reconstructions/*/in_resources/*/file/myfile.txt',
             '/project/nosetests/subjects/*/experiments/*Session*/scans/*/resources/*/file/myfile.txt',
             '/project/nosetests/subjects/*/experiments/*Session*/assessors/*/out_resources/*/file/myfile.txt',
             '/project/nosetests/subjects/*/experiments/*Session*/assessors/*/in_resources/*/file/myfile.txt',
             '/project/nosetests/subjects/*/experiments/*Session*/reconstructions/*/out_resources/*/file/myfile.txt',
             '/project/nosetests/subjects/*/experiments/*Session*/assessors/*/resources/*/file/myfile.txt'])
Example #3
0
def test_switch_to_plural():
    assert select.compute('/project') == ['/projects/*']
Example #4
0
def test_switch_to_singular():
    assert select.compute('/projects/nosetests') == ['/project/nosetests']
Example #5
0
def test_simple_level_expand():
    assert select.compute('/projects/IMAGEN//experiments') == \
           ['/project/IMAGEN/subjects/*/experiments/*']
Example #6
0
def test_simple_root_expand():
    assert select.compute('//experiments') == \
           ['/projects/*/subjects/*/experiments/*']
Example #7
0
def test_complete_stars_singular():
    assert select.compute('/project/subject/experiment') == \
           ['/projects/*/subjects/*/experiments/*']
Example #8
0
def test_complete_stars_plural():
    assert select.compute('/projects/subjects/experiments') == \
           ['/projects/*/subjects/*/experiments/*']