Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show poetry and poetry-core version in output of poetry about #5288

Merged
merged 1 commit into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/poetry/console/commands/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ class AboutCommand(Command):
description = "Shows information about Poetry."

def handle(self) -> None:
from poetry.utils._compat import metadata

self.line(
"""\
<info>Poetry - Package Management for Python</info>
f"""\
<info>Poetry - Package Management for Python

Version: {metadata.version('poetry')}
Poetry-Core Version: {metadata.version('poetry-core')}</info>

<comment>Poetry is a dependency manager tracking local dependencies of your projects\
and libraries.
Expand Down
8 changes: 7 additions & 1 deletion tests/console/commands/test_about.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ def tester(command_tester_factory: CommandTesterFactory) -> CommandTester:


def test_about(tester: CommandTester):
from poetry.utils._compat import metadata

tester.execute()
expected = """\

expected = f"""\
Poetry - Package Management for Python

Version: {metadata.version('poetry')}
Poetry-Core Version: {metadata.version('poetry-core')}

Poetry is a dependency manager tracking local dependencies of your projects and\
libraries.
See https://github.com/python-poetry/poetry for more information.
Expand Down