会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
凌晨的集市人不多
首页
新随笔
管理
上一页
1
···
25
26
27
28
29
30
31
32
33
···
60
下一页
2021年9月2日
Python csv 写入及 csv写入中文乱码
摘要: 1. csv 写入 CSV文件写入第一种方式:列表第二种方式:字典 1.1 列表 ''' csv文件写入 第一种方式:列表 第二种方式:字典 ''' import csv header = ['学号', '姓名', "年龄", "性别", "地址"] student_info = [ ['01',
阅读全文
posted @ 2021-09-02 12:52 Avicii_2018
阅读(332)
评论(0)
推荐(0)
2021年8月31日
Pytest @pytest.fixture
摘要: 示例: # -*-encoding: utf-8 -*- ''' 多个测试用例执行, 但是每个用例 对初始化和清除 的要求不同 ,可以使用@pytest.fixture() fixture(scope='',params=None,autouse=False,ids=None,name=None)
阅读全文
posted @ 2021-08-31 00:13 Avicii_2018
阅读(46)
评论(0)
推荐(0)
2021年8月30日
Pytest @pytest.mark.parametrize示例
摘要: 示例: # -*-coding: utf-8 -*- from selenium import webdriver import pytest import time search_list = ['小米','小米手机','小米10s','红米','耳机'] def setup_module():
阅读全文
posted @ 2021-08-30 21:55 Avicii_2018
阅读(63)
评论(0)
推荐(0)
Pytest @pytest.mark.parametrize装饰器
摘要: 示例: # -*- coding: utf-8 -*- ''' 业务逻辑相同,输入参数量较大, 使用 pyetst内置装饰器@pytest.mark.parametrize('参数名',参数列表) ''' import pytest @pytest.mark.parametrize('x,y',[(
阅读全文
posted @ 2021-08-30 20:49 Avicii_2018
阅读(55)
评论(0)
推荐(0)
2021年8月26日
Pytest 编写规则
摘要: 编写规则: 测试文件以test_开头(以_test结尾也可以) 测试类以Test开头,并且不能带有 init 方法 测试用例方法以test_开头 断言使用基本的assert即可 示例 : test_pyexample.py import pytest class TestClass: def tes
阅读全文
posted @ 2021-08-26 12:46 Avicii_2018
阅读(80)
评论(0)
推荐(0)
上一页
1
···
25
26
27
28
29
30
31
32
33
···
60
下一页