[pytest]
filterwarnings =
ignore::DeprecationWarning
addopts = -v -s
markers =
uat:1
smok:2
log_cli=1
xfail_strict = True
filterwarnings =
ignore::DeprecationWarning
这个的功能就是
test_login.py::Test_login::test_login_correct_password PASSED
============================================================================ warnings summary =============================================================================
..\..\..\applicationloadPath\pythonPath\Lib\site-packages\selenium\webdriver\remote\remote_connection.py:24
C:\applicationloadPath\pythonPath\Lib\site-packages\selenium\webdriver\remote\remote_connection.py:24: DeprecationWarning: 'urllib3[secure]' extra is deprecated and wi

本文介绍了如何在pytest中使用pytest.ini文件来过滤DeprecationWarning,以清洁测试输出。同时,讨论了如何为测试用例定义标签,但指出此功能目前只能在CMD命令行中通过标签筛选执行测试用例,无法直接在代码中实现。
订阅专栏 解锁全文
470

被折叠的 条评论
为什么被折叠?



