python
weixin_45911295
这个作者很懒,什么都没留下…
展开
-
在main文件中批量执行pytest用例并且输出测试报告遇到的问题
main.py代码如下import osimport pytestif __name__ == '__main__': os.system('rm -rf ../report/tmp') pytest.main(["-sv", "test_case/test_dataAnalysis.py", "test_case/test_enso.py", '--alluredir', '../report/tmp']) os.system('allure serve ../report/原创 2021-07-06 10:35:12 · 456 阅读 · 0 评论 -
python入门笔记——对象与变量
print(type(100))#type() 查看类型print(round(3.145263,4)) #取小数有效位print(9/4) #/可以除尽,等于2.25,不是只取整数部门,总是得到小数print(9//4) #//表示除法只取整数,等于2,小数部分不管print(9%4) #%取余数,余数为1,等于1print(2**4) #求次方,等于16#可执行某几句代码,选中要运行的代码,然后右击,execute selection in python consoleprint(原创 2020-10-23 14:35:34 · 90 阅读 · 1 评论