当前位置:网站首页>The combination of pytest confitest.py and fixture
The combination of pytest confitest.py and fixture
2022-07-26 10:55:00 【Yasso won't blow】
conftest.py Is the prescribed way of writing the file name , Configuration files and pytest.ini equally
Directory structure
Yes 2 Configuration files , A following directory , In a basics2 Under the table of contents 
Follow the list conftest.py

basics2 In the catalog conftest.py
basics2 Use cases under directory
Before and after operation
Code
import pytest
# The order in parentheses represents the order in which the prefix is executed first
def test(all_fixture,basics2_fixture):
print(" test conftest.py and fixture In combination with ")
if __name__ == '__main__':
pytest.main([r'D:\python New code set \pytest_study\basics2\test_fixture_conftest.py'])

result 
边栏推荐
- ESXi6.5补丁更新
- 344.反转字符串
- WIRESHARK基础教程以太帧的分析。
- ISO 639:1988 : Code for the representation of names of languages
- @Notblank, @notnull, @notempty differences and uses
- Bash shell learning notes (I)
- BLE之ATT请求
- Wireshark basic tutorial Ethernet frame analysis.
- C language pengge 20210812c language function
- 菜鸟看源码之LinkedBlockingQueue
猜你喜欢
随机推荐
C#halcon用户控件崩溃的一种处理方法
Traversal recursion + iteration of binary tree
35. 搜索插入位置
Bash shell learning notes (III)
ESXi6.5补丁更新
访问权限——private,public,protected
Sql Server 数据库之完整性约束
@Notblank, @notnull, @notempty differences and uses
Fragment lazy load
Bash shell learning notes (4)
Bash shell learning notes (II)
list升序和降序
使用Selenium抓取zabbix性能监控图
logging 高级使用
用两个栈实现队列
解决org.apache.commons.codec.binary.Base64爆红问题
ThreadPoolExecutor是怎样执行任务的
软件测试综述之软件测试的背景、实质、软件开发的过程
344.反转字符串
Sword finger offer (8): jump the steps




![Error[pe147]: declaration is incompatible with 'error problem](/img/4f/57145d78f4dc1fe84d2f271dd9d82f.png)




