我使用的是python 3.4.4和pytes-bdd 3.1.0,我可以使用以下命令执行测试用例
pytest-bdd -sv test_tc.py但是因为我已经开始使用python 3.7.5和pytest-bdd 4.1.0,所以如果我使用上面的命令,我会得到以下错误
pytest-bdd: error: argument command: invalid choice: test_tc.py (choose from ;migrate', 'generate')发布于 2021-09-28 13:32:05
您似乎混淆了命令pytest和命令pytest-bdd的用法,因为-sv test_tx.py的参数是用于pytest的。试着这样做:
pytest -sv test_tc.py基于docs和pytest-bdd的--help,它只接受migrate或generate
pytest-bdd generate features/some.feature > tests/functional/test_some.pyhttps://stackoverflow.com/questions/69361972
复制相似问题