当前位置:网站首页>3.3 测试模块的命名规则
3.3 测试模块的命名规则
2022-06-11 21:46:00 【redrose2100】
这里所说的测试模块实际就是测试脚本的文件,以上在讲的时候测试文件一致命名为test_demo.py,在本章开始也没有说什么要用test_demo.py,反正就这么用着,用到这里就有必要来分析分析文件的命名规则了
在pytest中,测试模块的命名规则是以test_开头或者_test结尾的文件,默认认为是测试文件
同样,话不多说,这里还是先来几个例子,这里需要创建几个文件(https://gitee.com/redrose2100/pytest-demo/tree/master/ch03/ex_004)
test_demo.py文件代码如下
def test_demo():
print("in test_demo.py")
assert 1==1
demo_test.py文件代码如下:
def test_demo():
print<边栏推荐
- 「大模型」之所短,「知识图谱」之所长
- Building a custom CNN model: identifying covid-19
- In the future, cloud expansion technology is expected to be selected as a specialized, special and new enterprise in Shanghai
- Leetcode-43- string multiplication
- R语言书籍学习03 《深入浅出R语言数据分析》-第八章 逻辑回归模型 第九章 聚类模型
- 详解异步任务:函数计算的任务触发去重
- 效率起飞啊!还能这样开发的?
- 69. x的平方根
- 《物联网开发实战》18 场景联动:智能电灯如何感知光线?(上)(学习笔记)
- Relatively perfect singleton mode
猜你喜欢

华为设备配置HoVPN

Nmap performs analysis of all network segment IP survivals in host detection

How to use the transaction code sat to find the name of the background storage database table corresponding to a sapgui screen field

ESP32C3 Arduino库使用方法

Classes and objects (4)

Win10弹出USB时出现该设备正在使用的解决方法

Nmap进行主机探测出现网段IP全部存活情况分析

R语言书籍学习03 《深入浅出R语言数据分析》-第七章 线性回归模型

The college entrance examination is over, and life has just begun. Suggestions from a 10-year veteran in the workplace

Leetcode-43- string multiplication
随机推荐
详解异步任务:函数计算的任务触发去重
2022-02-28(2)
Daily question - Roman numeral to integer
Superscalar processor design yaoyongbin Chapter 2 cache -- Excerpt from subsection 2.2
go io模块
How to view the installation date of the win system
Matlab: 文件夹锁定问题的解决
Superscalar processor design yaoyongbin Chapter 2 cache -- Excerpt from subsection 2.4
[niuke.com] dp31 [template] complete Backpack
C语言实现八种排序(2)
Classes and objects (2)
RPA+低代码为何是加速财务数字化转型之利器?
Example of using zypper command
Maze problem in C language
Release of version 5.6 of rainbow, add multiple installation methods, and optimize the topology operation experience
二分查找 - 学习
C语言实现八种排序(3)
238.除自身以外数组的乘积
Cdr2022 serial number coreldraw2022 green key
Binary search - Learning