上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页
摘要: 其他线程使用某个线程中提取的值,比如场景:客户端一直与服务端保持连接的同时进行其他业务操作 1.建立以下两个线程组,并添加相应业务接口 2.发送心跳时,需要token,在用户登录接口下添加提取器提取token 3.在用户登录接口下添加BeanShell后置处理程序 4.将提取的token使用__se 阅读全文
posted @ 2021-04-06 12:07 **绵绵羊** 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 在python中,至少有两类错误,一种是程序语法错误,一种是程序异常。 所谓的语法错误是指你未按规定格式书写导致的错误,如:定义函数时,括号后面要紧跟英文冒号,若缺失则不能识别与运行,并抛出 SyntaxError: invalid syntax错误 def exceptions() print(" 阅读全文
posted @ 2021-03-01 19:31 **绵绵羊** 阅读(3109) 评论(0) 推荐(0) 编辑
摘要: models.py # 创建产品表 class Product(models.Model): productName = models.CharField('产品名称', max_length=64) # 产品名称 productDesc = models.CharField('产品描述', max 阅读全文
posted @ 2021-02-23 19:40 **绵绵羊** 阅读(461) 评论(0) 推荐(1) 编辑
摘要: 执行命令 python manage.py makemigrations时抛出以下错误 Traceback (most recent call last): File "D:\Program Files\Python\Python37-32\lib\site-packages\django\db\b 阅读全文
posted @ 2021-02-23 19:33 **绵绵羊** 阅读(1319) 评论(0) 推荐(0) 编辑
摘要: 举个例子: str1 = 'sunlightn' f = str1.rfind("n", __start=1, __end=2) print(f) 以上代码运行后出现: "D:\Program Files\Python\Python37-32\python.exe" D:/demo/str_1.py 阅读全文
posted @ 2021-02-23 19:19 **绵绵羊** 阅读(11577) 评论(0) 推荐(0) 编辑
摘要: 执行python manage.py makemigrations时出现以下错误 D:\autotestplat>python manage.py makemigrations Traceback (most recent call last): File "manage.py", line 21, 阅读全文
posted @ 2021-02-23 18:30 **绵绵羊** 阅读(2324) 评论(0) 推荐(0) 编辑
摘要: 在python中,字符串是最常用的数据类型,通常由单引号(' ')、双引号(" ")、三重引号(''' ''',""" """)引起来。 # 字符串的创建 str1 = "hello world" str2 = 'sunlight' str3 = '''On a new day, the sun r 阅读全文
posted @ 2021-02-23 18:25 **绵绵羊** 阅读(210) 评论(0) 推荐(0) 编辑
摘要: import os import xlrd PATH = lambda p: os.path.abspath( os.path.join(os.path.dirname(__file__), p) ) class ExcelData: def __init__(self, file, sheet=" 阅读全文
posted @ 2021-01-06 09:34 **绵绵羊** 阅读(127) 评论(0) 推荐(0) 编辑
摘要: import os import yaml from yamlinclude import YamlIncludeConstructor YamlIncludeConstructor.add_to_loader_class(loader_class=yaml.FullLoader) # 用于yaml 阅读全文
posted @ 2021-01-05 20:00 **绵绵羊** 阅读(1090) 评论(0) 推荐(0) 编辑
摘要: 很早之前做自动化测试,并没有将测试数据与数据库关联,而是直接通过json、ymal、excel等文件管理的。那么怎么用python读写文件呢? 在操作文件前,都需要打开文件,打开文件用内置函数open() open函数 用于打开文件,创建一个file对象,常用格式为: open(file, mode 阅读全文
posted @ 2021-01-05 19:56 **绵绵羊** 阅读(470) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页