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' ) ) )
Пример #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')))
Пример #5
0
def PathsToAllParentFolders_FileAtRoot_test():
    eq_(['/'], list(_PathsToAllParentFolders('/test.c')))
Пример #6
0
def PathsToAllParentFolders_Basic_test():
    eq_(['/home/user/projects', '/home/user', '/home', '/'],
        list(_PathsToAllParentFolders('/home/user/projects/test.c')))