Beispiel #1
0
def test_path_list_file():
    path_str = 'tests/fixtures/dir1/file2.txt'
    p = base.Path(path_str)
    pprint(str(p))
    for uri in list(p.list()):
        pprint(str(uri))
    assert path_str == list(p.list())[0].path
Beispiel #2
0
def test_path_list_1():
    p = base.Path('tests/fixtures')
    pprint(str(p))
    for uri in list(p.list()):
        pprint(str(uri))
Beispiel #3
0
def test_path_copy_1():
    src = base.Path('tests/fixtures')
    dest = base.Path('/tmp')
    src.copy(dest, dry_run=True)
Beispiel #4
0
def test_path_list_exclude_dirs():
    p = base.Path('tests/fixtures')
    pprint(str(p))
    for uri in list(p.list(dirs=False)):
        pprint(str(uri))
Beispiel #5
0
def test_path_repr():
    p = base.Path('/dir/path/file.txt')
    p._abs_path = '/dir/path/file.txt'
    print(repr(p))