def returns_path_if_path_references_a_file(self): path = self._touch("go.py") assert_equal([path], list(paths.find_files(path)))
def returns_files_in_subdirectories_of_referenced_directory(self): self._mkdir("x") self._mkdir("x/y") path = self._touch("x/y/go.py") assert_equal([path], list(paths.find_files(path)))
def raises_error_if_path_does_not_exist(self): assert_raises_regexp( IOError, "^/not/a/real/path/asljfliahfkb34525: No such file or directory", lambda: list(paths.find_files("/not/a/real/path/asljfliahfkb34525")), )