reportPath =文件夹路径
listdir=以一个list返回文件夹下所以文件

dirs = os.listdir(reportPath)
print(dirs)


def __get_report(self):
"""获取最新测试报告"""
dirs = os.listdir(reportPath)
# print(dirs)
dirs.sort() #列表排序
newreportname = dirs[-1]
print('The new report name: {0}'.format(newreportname))
return newreportname

相关文章:

  • 2022-12-23
  • 2021-12-03
  • 2021-06-20
  • 2021-07-13
  • 2022-02-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案