ier*_*dna 1 python python-poetry pyproject.toml
我最近从 Pipenv 转向诗歌。我习惯在我的 Pipfile 中包含此部分:
[scripts]
test="pytest -s"
test:watch="ptw --runner 'pytest -s'"
Run Code Online (Sandbox Code Playgroud)
因此我可以轻松运行测试,而无需键入完整命令或输入 shell,例如:
[scripts]
test="pytest -s"
test:watch="ptw --runner 'pytest -s'"
Run Code Online (Sandbox Code Playgroud)
当我在 pyproject.toml 中尝试类似的操作时:
pipenv run test:watch
Run Code Online (Sandbox Code Playgroud)
我收到错误:
[tool.poetry.scripts]
watch = "ptw --runner 'pytest -s'"
Run Code Online (Sandbox Code Playgroud)
我应该为此使用 pyproject.toml 中的不同部分吗?