当前位置:网站首页>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 
边栏推荐
猜你喜欢
随机推荐
2021-08-14 Sanzi chess
RT thread learning notes (I) -- configure RT thread development environment
Bash shell学习笔记(六)
WIRESHARK基础教程以太帧的分析。
Toolstrip border removal
logging基本使用
pytest 前后置方法
Bash shell learning notes (V)
Capture ZABBIX performance monitoring chart with selenium
MFC多线程的简单使用
35. Search the insertion position
RT thread learning notes (VII) -- open the elmfat file system based on SPI flash (middle)
@NotBlank、@NotNull 、@NotEmpty 区别和使用
@Notblank, @notnull, @notempty differences and uses
RT thread learning notes (V) -- edit, download and debug programs
RT thread learning notes (VI) -- start the elmfat file system based on SPI flash (Part 1)
用两个栈实现队列
LE Audio规范概述
Sql Server 数据库之初学体验
BigDecimal's addition, subtraction, multiplication and division, size comparison, rounding up and down, and BigDecimal's set accumulation, judge whether BigDecimal has decimal








