摘要: 场景 退出多重for循环,break只能退出一层 class ReturnError(Exception): pass def compare(dst, src): try: for dst_k, dst_v in dst_dict.items(): if dst_k not in src_dict 阅读全文
posted @ 2022-05-31 11:23 fly_pig 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 1. hex stream(str) -> bytes hex_stream_str ="hex stream str" bytes = bytes.fromhex(hex_stream_str) 2. bytes -> hex stream(str) def bytes_to_hexString( 阅读全文
posted @ 2022-04-27 21:26 fly_pig 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 1. Tags 功能强大,个性化跑测试用例 robot -i smoke -e nrun ./ 一次跑多个tags robot.exe -i smokeANDvcANDhigh . 2. 罗列testcase from robot.running import TestSuiteBuilder fr 阅读全文
posted @ 2021-10-25 15:47 fly_pig 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 场景:mqtt开启监控消息,根据消息内容退出监控 问题描述:mqtt的loop函数是整个on_message完全执行完成,才会真正on_pulish 二话不说,直接上代码 # 主程 thread_xxx = threading.Thread(target=run) thread_xxx.start( 阅读全文
posted @ 2021-10-09 14:18 fly_pig 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 1. 需求 把一个zip包分段上传到服务器上。 2. 测试 // 改造而来,非原创import os import requests import math import traceback from requests_toolbelt.multipart.encoder import Multip 阅读全文
posted @ 2021-09-29 15:19 fly_pig 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 1. for循环与中断 Test1 [Documentation] xxx FOR ${var} IN RANGE 1 100 打印日志 ${var} ${res} 业务层 Should Be Equal ${res} success # 只出现一次 Run keyword If '${res}'= 阅读全文
posted @ 2021-09-17 11:07 fly_pig 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1. 简介 自认为的高深用法总结 2. 运算条件 + 闭包 2.1 知识点 运算条件: operator.py 闭包 = 嵌套函数 + 外部变量 2.2 场景 “大于5发送201” : 闭包函数("大于", 5, 201) “大于等于1发送200”: 闭包函数("大于等于", 1, 200) 2.3 阅读全文
posted @ 2021-09-07 16:16 fly_pig 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 参考:https://stackoverflow.com/questions/40102223/how-to-configure-yaml-to-create-fresh-log-files-instead-of-appending-them 阅读全文
posted @ 2021-07-23 14:40 fly_pig 阅读(784) 评论(0) 推荐(0) 编辑
摘要: 1. 前言 转载: 《PyQt5 Designer 快速掌握》02 所谓堆叠布局_庸了个白's blog-CSDN博客_pyqt5 堆叠布局 2. 代码 from PyQt5.QtWidgets import QApplication, QStackedLayout, QWidget # 导入生成的 阅读全文
posted @ 2021-07-07 18:47 fly_pig 阅读(572) 评论(0) 推荐(0) 编辑
摘要: 参考:https://www.cnblogs.com/welen/articles/9724924.html 1. 多线程和GIL GIL(Global Interpreter Lock)全局解释器锁 在非python环境中,单核情况下,同时只能有一个任务执行。多核时可以支持多个线程同时执行。但是在 阅读全文
posted @ 2021-01-12 16:03 fly_pig 阅读(78) 评论(0) 推荐(0) 编辑