question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sinoroccommented, Nov 20, 2020

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.

1reaction
sinoroccommented, Nov 20, 2020

Suggestion: poethepoet (see also this comment).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found