Implement a poetry test command.
I've been using Makefiles (and sometimes just snippets of code) to manage testing over CIs and I'd like a poetry test command to manage centralize this (for some systems don't have GNU Make).
To configure it, there should be a new section in thepyproject.toml stating what poetry test does, like this:
[tool.poetry.test]
command = "pytest -vvv --cov=package_name"
after_success = 'echo "Yay! All tests have passed!" '
Basically, poetry will run that command in a virtual environment (which does not include the package itself) that has installed all the dependancies.
While there is tox, poetry test would be a shorthand for poetry install && poetry run <test command>
If anything like that, then I'd rather see a general purpose shortcut for commands such as:
I might make a new issue proposing that instead. That's actually what I want: a centralized command shortcut (basically Makefiles except Makefiles are annoying)
There is always _pyinvoke_
I believe something like that could work (untested, pseudo code):
[tool.poetry.dev-dependencies]
invoke = '*'
import invoke
@invoke.task
def test(c):
c.run('python -m pytest')
poetry run invoke test
Also maybe there are already tickets for a similar feature, I have not searched yet.
Related: https://github.com/python-poetry/poetry/pull/591#issuecomment-504762152
Poetry is a package and dependency manager, not a task manager. This feature is beyond the scope and the original purpose of Poetry and will likely never be integrated into it.
I'd say (as I commented on many other feature requests), wait until _poetry_ gets its plugin system (scheduled for _v1.2_), and this feature could hopefully be made into a poetry plugin.
Got it, I'll use pyinvoke for now
Suggestion: _poethepoet_ (see also this comment).