代码截图:
import pytest
def test_demo1():
print('打印:demo1')
assert 1
def test_demo2():
print('打印:demo2')
assert 2
if __name__ == '__main__':
pytest.main(['Pytest.py', '-s', '--html=report.html'])
报错:error: unrecognized arguments: --html=report.html
理论上是没有安装pytest的插件pytest-html,在终端上输入pip install pytest-html
不知道有没有安装的,在终端上输入pip list
已经安装了还报错的
移步pycharm