def PathsToAllParentFolders_WindowsPath_test():
  eq_( [ r'C:/foo/goo/zoo', r'C:/foo/goo', r'C:/foo', 'C:' ],
       list( _PathsToAllParentFolders( r'C:/foo/goo/zoo/test.c' ) ) )
def PathsToAllParentFolders_FileAtRoot_test():
  eq_( [ '/' ],
       list( _PathsToAllParentFolders( '/test.c' ) ) )
def PathsToAllParentFolders_Basic_test():
  eq_( [ '/home/user/projects', '/home/user', '/home', '/' ],
       list( _PathsToAllParentFolders( '/home/user/projects/test.c' ) ) )
Exemplo n.º 4
0
def PathsToAllParentFolders_WindowsPath_test():
    eq_([r'C:/foo/goo/zoo', r'C:/foo/goo', r'C:/foo', 'C:'],
        list(_PathsToAllParentFolders(r'C:/foo/goo/zoo/test.c')))
Exemplo n.º 5
0
def PathsToAllParentFolders_FileAtRoot_test():
    eq_(['/'], list(_PathsToAllParentFolders('/test.c')))
Exemplo n.º 6
0
def PathsToAllParentFolders_Basic_test():
    eq_(['/home/user/projects', '/home/user', '/home', '/'],
        list(_PathsToAllParentFolders('/home/user/projects/test.c')))