예제 #1
0
def test_uri_windows_abs_fail():
    try:
        u = path(r'q:\stuff\file.txt')
    except:
        # Should throw exception since we (probably) are cd'd to q: drive 
        assert True
    else:
        assert False
예제 #2
0
def test_uri_windows_abs_fail():
    try:
        u = path(r'q:\stuff\file.txt')
    except:
        # Should throw exception since we (probably) are cd'd to q: drive
        assert True
    else:
        assert False
예제 #3
0
def test_uri_windows_abs_2():
    u = path(r'C:/stuff/file.txt')
    print(u)
    assert type(u) == windows.WindowsPath
예제 #4
0
def test_uri_windows_abs():
    u = path(r'c:\stuff\file.txt')
    print(u)
    assert type(u) == windows.WindowsPath
예제 #5
0
def test_uri_posix_rel_2():
    u = path('dir/file.txt')
    print(u)
    assert type(u) == posix.PosixPath
예제 #6
0
def test_uri_windows_abs():
    u = path(r'c:\stuff\file.txt')
    print(u)
    assert type(u) == windows.WindowsPath
예제 #7
0
def test_uri_smb_extended():
    u = path(r'\\?\UNC\hostname\share\dirname\filename.txt')
    print(u)
    assert type(u) == smb.SmbPath
예제 #8
0
def test_uri_windows_rel_3():
    u = path(r'dir\file.txt')
    print(u)
    assert type(u) == windows.WindowsPath
예제 #9
0
def test_uri_smb_extended():
    u = path(r'\\?\UNC\hostname\share\dirname\filename.txt')
    print(u)
    assert type(u) == smb.SmbPath
예제 #10
0
def test_uri_windows_rel_extended():
    u = path(r'\\?\looooongdir\file.txt')
    print(u)
    assert type(u) == windows.WindowsPath
예제 #11
0
def test_uri_windows_rel_3():
    u = path(r'dir\file.txt')
    print(u)
    assert type(u) == windows.WindowsPath
예제 #12
0
def test_uri_posix_abs():
    u = path('/usr/local/dir/file.txt')
    print(u)
    assert type(u) == posix.PosixPath
예제 #13
0
def test_uri_windows_abs_extended():
    u = path(r'\\?\C:\stuff\file.txt')
    print(u)
    assert type(u) == windows.WindowsPath
예제 #14
0
def test_uri_windows_abs_2():
    u = path(r'C:/stuff/file.txt')
    print(u)
    assert type(u) == windows.WindowsPath
예제 #15
0
def test_uri_windows_abs_extended():
    u = path(r'\\?\C:\stuff\file.txt')
    print(u)
    assert type(u) == windows.WindowsPath
예제 #16
0
def test_uri_rsync_daemon():
    u = path('username@hostname::/x/y/z')
    print(u)
    assert type(u) == rsync.RsyncPath
예제 #17
0
def test_uri_posix_abs():
    u = path('/usr/local/dir/file.txt')
    print(u)
    assert type(u) == posix.PosixPath
예제 #18
0
def test_uri_rsync_p():
    u = path('rsync://username@hostname:/x/y/z')
    print(u)
    assert type(u) == rsync.RsyncPath
예제 #19
0
def test_uri_windows_rel_extended():
    u = path(r'\\?\looooongdir\file.txt')
    print(u)
    assert type(u) == windows.WindowsPath
예제 #20
0
def test_uri_rsync_p():
    u = path('rsync://username@hostname:/x/y/z')
    print(u)
    assert type(u) == rsync.RsyncPath
예제 #21
0
def test_uri_rsync_daemon():
    u = path('username@hostname::/x/y/z')
    print(u)
    assert type(u) == rsync.RsyncPath
예제 #22
0
def test_uri_posix_rel_2():
    u = path('dir/file.txt')
    print(u)
    assert type(u) == posix.PosixPath