Esempio n. 1
0
def test_tif_tiff_flat(tmpdir):
    filenames = ['b.tif', 'a.tif', 'c.tiff']
    expected = ['a.tif', 'b.tif', 'c.tiff']
    make(tmpdir, filenames)
    actual = LocalParallelReader().list(str(tmpdir),
                                        ext='tif',
                                        recursive=False)
    assert parse(actual) == expected
    actual = LocalParallelReader().list(str(tmpdir), ext='tif', recursive=True)
    assert parse(actual) == expected
Esempio n. 2
0
def test_tif_tiff_recursive(tmpdir):
    filenames = ['foo/b.tif', 'foo/bar/q.tiff', 'bar/a', 'c.tif', 'd.tiff']
    expected = ['c.tif', 'd.tiff']
    make(tmpdir, filenames)
    actual = LocalParallelReader().list(str(tmpdir),
                                        ext='tif',
                                        recursive=False)
    assert parse(actual) == expected
    expected = ['c.tif', 'd.tiff', 'b.tif', 'q.tiff']
    actual = LocalParallelReader().list(str(tmpdir), ext='tif', recursive=True)
    assert parse(actual) == expected
Esempio n. 3
0
def test_parallel_recursive_nested(tmpdir):
    filenames = ['foo/b', 'foo/bar/q', 'bar/a', 'c']
    expected = ['a', 'c', 'b', 'q']
    make(tmpdir, filenames)
    actual = LocalParallelReader().list(str(tmpdir), recursive=True)
    assert parse(actual) == expected
Esempio n. 4
0
def test_parallel_recursive_flat(tmpdir):
    filenames = ['b', 'a', 'c']
    expected = ['a', 'b', 'c']
    make(tmpdir, filenames)
    actual = LocalParallelReader().list(str(tmpdir), recursive=True)
    assert parse(actual) == expected