
python
春暖鱼跳
喜欢运动旅游
展开
-
pycharm上执行pyuic,文件指定不对,那就用命令执行吧
直接通过命令执行pyuic5原创 2022-09-19 17:00:44 · 323 阅读 · 0 评论 -
Python 赋值运算
python 常见赋值运算原创 2022-09-09 13:51:03 · 334 阅读 · 0 评论 -
运行python代码时,直接在函数后面加参数的值---通过sys.argv实现
如何实现执行python文件时间在后面添加参数原创 2022-07-21 12:10:58 · 353 阅读 · 0 评论 -
Python 获取文件的绝对路径方法
是用import osos.path.abspath('文件名')原创 2022-04-14 16:52:01 · 2422 阅读 · 2 评论 -
pytest执行报错pluggy.manager.PluginValidationError: Plugin for hook ‘pytest_collect_file‘hookimpl defi
解决方法:先卸载目前版本 pip uninstall pytest再安装最新版本 pip install pytest就能解决掉原创 2022-04-02 15:20:42 · 1610 阅读 · 0 评论 -
pycharm上执行allure
先执行pytest pytest-html-test.py --alluredir .\report\原创 2021-12-24 15:25:23 · 1023 阅读 · 0 评论 -
【pytest】AttributeError: module ‘allure‘ has no attribute ‘severity_level‘
解决方法原创 2021-12-24 14:11:03 · 354 阅读 · 0 评论 -
pytest 跑重复执行@pytest.mark.repeat(1)报warnings的解决方法
PytestUnknownMarkWarning: Unknown pytest.mark.repeat - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html解决方法:安装repeat;命令:pipinstallrepeat...原创 2021-12-02 14:31:37 · 1012 阅读 · 1 评论 -
python3 报错TypeError: unsupported format string passed to bytes.__format__的解决方法
解决方法,去掉:S就可以了原创 2021-06-25 09:25:57 · 3773 阅读 · 0 评论 -
在Pycharm添加第三方库,比如python-appium-client
原创 2020-08-14 18:40:06 · 1144 阅读 · 0 评论 -
请求体里面含有时间戳,这个请求提是放在excel表格里面,怎么实现每次请求体不一样
二,使用python实现发送http请求,并且请求体是获取excel表格里面1、问题请求体里面含有时间戳,所有每一次发送的请求体必须不一样,因为时间戳每次是不一样的{"uid": "10523682", "type": "1", "timestamp": timestamp"languageCode": "cn"}解决方法,把字典时间戳元素单独拿出来赋值;...原创 2020-07-03 15:07:40 · 302 阅读 · 0 评论 -
解决从excel读取字典后再json格式转换格式错误
一、需求:用python实现http请求,请求体内容获取excel表格里面的内容1,而excel表格内容是字典,有换行;{"uid": "10523682", "type": "1","languageCode": "cn"}实现的代码结果打印出来:多了\n 空格 \2,而excel表格内容是字典,没有换行;{"uid": "10523682","type": "1","languageCode": "cn"}结果打印出来:只有\二:用上面请求体发送,结...原创 2020-07-03 14:36:25 · 570 阅读 · 0 评论 -
通过jmeter实现,请求体通过sha1加密后在发送(pyhon)
1、先使用python语言编写哈希加密方法;核心代码就一行jmeter上调用原创 2020-06-30 18:36:54 · 399 阅读 · 0 评论 -
Python访问WebService接口
http://huangfang7891-gmail-com.iteye.com/blog/1886965转载 2013-07-09 16:34:11 · 564 阅读 · 0 评论 -
Python语言双下横线
操作符重载通过定义类的一些约定的以""开头并结尾的函数,可以到达重载一些特定操作的目的,下面是是一些常用的重载(下面的是双下横线)6.4.1. __str__ / __unicode__ 当print一个对象实例时,实际是print该实例str()函数的返回值.class A: def __str__(self): retur原创 2013-04-11 15:50:00 · 2076 阅读 · 0 评论