【接口自动化测试实战】【一】Pytest 框架用例规范与运行
一、生成随机时间
import time
print(time.time()) # float
print(int(time.time()))
print('test_%s' % int(time.time()))
print('test_{}'.format(int(time.time())))
print(f'test_{int(time.time())}') # 推荐
print('test_'+str(int(time.time())))
Default test runner:
Run pytest for test.py