python
charles_gy
这个作者很懒,什么都没留下…
展开
-
Allure2环境配置for Pytest
Python3+pytest+Allure2 1.For Mac install allure:brew install allure For Windows 参考:https://www.jianshu.com/p/5735d388faa2 2.Pycharm安装pytest-allure 3.编写pytest测试脚本 4.执行命令 pytest --alluredir allure-result test_pytest.py #allure-result为当前目录下的创建的文件夹,tes原创 2021-03-26 19:46:00 · 180 阅读 · 0 评论 -
python操作mysql
oding:utf-8import MySQLdbimport sys#建立和数据库的连接db=MySQLdb.connect(host='rm-uf6m12',user="xx",passwd="xx",db = "sx_ls_pre")#获取操作游标cursor = db.cursor()#执行sql#cursor.execute("select mobile_code from ls_sms...转载 2018-07-01 21:47:12 · 189 阅读 · 0 评论 -
python %s占位符的使用
#单个占位符使用% myscore =1000 message = 'I scored %s ponits' print message % myscore #多个占位符的使用 firstName = "xiao11wang" lastName = "dana" name = 'my name is %s %s' print name % (firstName,lastNam...原创 2018-12-22 17:10:53 · 1461 阅读 · 0 评论