A new command: poetry test
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
Feature Request
Implement a poetry test command.
Background
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).
Demonstration
To configure it, there should be a new section in the pyproject.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!" '
Implementation
Basically, poetry will run that command in a virtual environment (which does not include the package itself) that has installed all the dependancies.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Commands | Documentation | Poetry - Python dependency ...
This command will help you kickstart your new Python project by creating a ... poetry install --without test,docs ... poetry install --with test,docs....
Read more >Build and Test a Command Line Interface with Poetry, Python ...
The Python Fire package provides a way to develop a command line interface (CLI) in Python, automatically, with very minimal extra code.
Read more >Dependency Management With Python Poetry
You can create a new Poetry project by using the new command and a project name as an ... Poetry has also added...
Read more >Configure a Poetry environment | IntelliJ IDEA Documentation
Install Poetry. Open Terminal (on macOS and Linux) or PowerShell (on Windows) and execute the following command: macOS. Windows.
Read more >Tox with Pyenv & Poetry to Test Projects with Multiple Python ...
tox describes itself as a “command line driven CI frontend and development task automation tool”, and one of the automated tasks it can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Related: https://github.com/python-poetry/poetry/pull/591#issuecomment-504762152
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.
Suggestion: poethepoet (see also this comment).