摘要: 1.兼容性问题(最需要注意的) 用法很简单,但是如果和以下插件一起使用,重跑会失效 不可以和fixture装饰器一起使用:@pytest.fixture() 该插件与pytest-xdist的 标志不兼容 --looponfail 该插件与核心标志不兼容 --pdb 2.安装rerunfailure 阅读全文
posted @ 2022-10-27 10:58 小柴i 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 1.在teardown_method中获取参数化的参数,打印带参数化的函数名 pytest_me.py: import pytest param_data = [ { 'ip': '172.31.3.80', 'unit': 1, }, { 'ip': '172.31.3.80', 'unit': 阅读全文
posted @ 2022-10-10 10:28 小柴i 阅读(42) 评论(0) 推荐(0) 编辑
摘要: Error: $ sudo terminator File "/usr/bin/terminator", line 123 except (KeyError,ValueError), ex: ^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: multiple except 阅读全文
posted @ 2022-09-29 10:41 小柴i 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 串口调试利器--Minicom配置及使用详解 常用参数: sudo minicom -b 115200 -D /dev/ttyUSB1 -C MCU1.cap 阅读全文
posted @ 2022-09-27 19:19 小柴i 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 详细说明:坐标转换 import requests # 116.497759,39.979316 # 116.497759,39.979331 # 116.497759,39.979346 def gd_map(): para = {'key': '8a2191b448b4de6aefe7fc7f5 阅读全文
posted @ 2022-09-22 14:48 小柴i 阅读(520) 评论(0) 推荐(0) 编辑
摘要: 1.问题描述 找不到mycommon文件 2. 原因 本身mycommon 和test就不在一个目录,再执行test的时候,调用add_num的import的时候是再test.py的目录下查找的文件。执行的是test.py ,a56爆大奖在线娱乐python默认把test 所在的目录作为搜索包的路径,from my 阅读全文
posted @ 2022-09-14 09:46 小柴i 阅读(56) 评论(0) 推荐(0) 编辑
摘要: if __name__ == '__main__': str_time = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())) time_array = time.strptime(str_time, '%Y-%m-%d % 阅读全文
posted @ 2022-08-30 18:06 小柴i 阅读(3912) 评论(0) 推荐(0) 编辑
摘要: def show_txt(): file_lst = os.listdir(LOG_DIR) txt_lst = [x for x in file_lst if x.find('.txt') != -1] txt_lst.sort(reverse=True) print(txt_lst) 阅读全文
posted @ 2022-08-25 19:59 小柴i 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 类的成员函数末尾加const的作用 结论: 1.非const对象可以访问const成员函数和非const成员函数 2.const对象不能访问非const成员函数,可以访问const成员函数 3.const成员函数不能修改成员属性 #include <iostream> using namespace 阅读全文
posted @ 2022-08-13 10:58 小柴i 阅读(59) 评论(0) 推荐(0) 编辑
摘要: lst = [x for x in str.split(' ') if x] 阅读全文
posted @ 2022-08-12 13:43 小柴i 阅读(143) 评论(0) 推荐(0) 编辑