def test_find_ffile(self, filelist): assert PathHelper.find_first_dir_with_file( "dir1", "*le") == os.path.abspath(os.path.dirname(filelist[9])) assert PathHelper.find_first_dir_with_file( "dir1", "ff*") == os.path.abspath(os.path.dirname(filelist[8])) assert PathHelper.find_first_dir_with_file("dir1/foo", "ff*") is None
def test_find_pythoon(self, filelist): assert PathHelper.find_first_dir_with_file( "dir1", "pythooon") == os.path.abspath( os.path.dirname(filelist[4])) assert PathHelper.find_first_dir_with_file( os.path.curdir, "py*n") == os.path.abspath(os.path.dirname(filelist[4])) assert PathHelper.find_first_dir_with_file( "dir1/bar", "pythooon") is None
def test_find_file(self, filelist): assert PathHelper.find_first_dir_with_file( "dir1", "file") == os.path.abspath( os.path.dirname(filelist[9])) assert PathHelper.find_first_dir_with_file( os.path.curdir, "file") == os.path.abspath(os.path.dirname(filelist[0])) assert PathHelper.find_first_dir_with_file( "dir1/baz", "file") is None
def test_find_ffile(self, filelist): assert PathHelper.find_first_dir_with_file( "dir1", "*le") == os.path.abspath( os.path.dirname(filelist[9])) assert PathHelper.find_first_dir_with_file( "dir1", "ff*") == os.path.abspath( os.path.dirname(filelist[8])) assert PathHelper.find_first_dir_with_file( "dir1/foo", "ff*") is None
def test_find_pythoon(self, filelist): assert PathHelper.find_first_dir_with_file( "dir1", "pythooon") == os.path.abspath(os.path.dirname(filelist[4])) assert PathHelper.find_first_dir_with_file( os.path.curdir, "py*n") == os.path.abspath(os.path.dirname(filelist[4])) assert PathHelper.find_first_dir_with_file("dir1/bar", "pythooon") is None
def test_find_file(self, filelist): assert PathHelper.find_first_dir_with_file( "dir1", "file") == os.path.abspath(os.path.dirname(filelist[9])) assert PathHelper.find_first_dir_with_file( os.path.curdir, "file") == os.path.abspath(os.path.dirname(filelist[0])) assert PathHelper.find_first_dir_with_file("dir1/baz", "file") is None