CMD: 1.安装:pip install pytest-pep8 2.本地目录执行: pytest .\02_pytest-flakes插件_静态代码检查.py --pep8 3.本地目录执行结果: E:\python\Lib\site-packages\pep8.py:110: FutureWarning: Possible nested set at position 1 EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]') ================================================= test session starts ================================================= platform win32 -- Python 3.11.3, pytest-7.4.2, pluggy-1.3.0 rootdir: E:\learnPython\01_01_pytest插件使用 plugins: allure-pytest-2.13.2, assume-2.4.3, cov-4.1.0, flakes-4.0.5, html-4.0.2, metadata-3.0.0, ordering-0.6, pep8-1.0.6, picked-0.5.0, repeat-0.9.1, rerunfailures-12.0, xdist-3.3.1 collected 0 items / 1 error ======================================================= ERRORS ======================================================== ____________________________________________ ERROR collecting test session ____________________________________________ Direct construction of pytest_pep8.Pep8Item has been deprecated, please use pytest_pep8.Pep8Item.from_parent. See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details. =============================================== short test summary info =============================================== ERROR - Failed: Direct construction of pytest_pep8.Pep8Item has been deprecated, please use pytest_pep8.Pep8Item.from_parent. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ================================================== 1 error in 0.33s ===================================================
pytest学习实践-day37:05_pytest-pep8插件_代码格式检查--坑爹的pep8,经常报错
最新推荐文章于 2024-07-02 10:24:12 发布