Skip to content

Commit

Permalink
Address CR issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Secrus committed Oct 27, 2024
1 parent 25b430c commit a706a59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
15 changes: 2 additions & 13 deletions tests/console/commands/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,16 +315,5 @@ def test_check_does_not_error_on_pypi_reference(
tester = command_tester_factory("check", poetry=poetry_with_pypi_reference)
status_code = tester.execute("")

# Warnings about deprecated syntax are expected
assert tester.io.fetch_error() == (
"Warning: [tool.poetry.name] is deprecated. Use [project.name] instead.\n"
"Warning: [tool.poetry.version] is set but 'version' is not in [project.dynamic]."
" If it is static use [project.version]. If it is dynamic, add 'version' to"
" [project.dynamic].\nIf you want to set the version dynamically via `poetry build"
" --local-version` or you are using a plugin, which sets the version dynamically,"
" you should define the version in [tool.poetry] and add 'version' to"
" [project.dynamic].\nWarning: [tool.poetry.description] is deprecated."
" Use [project.description] instead.\nWarning: [tool.poetry.authors] is"
" deprecated. Use [project.authors] instead.\n"
)
assert status_code == 1
assert tester.io.fetch_output() == "All set!\n"
assert status_code == 0
7 changes: 5 additions & 2 deletions tests/fixtures/pypi_reference/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[tool.poetry]
[project]
name = "foobar"
version = "0.1.0"
description = ""
authors = ["Poetry Developer <developer@python-poetry.org>"]
authors = [
{ name = "Poetry Developer", email = "<developer@python-poetry.org>" }
]
dynamic = ["dependencies", "requires-python"]

[tool.poetry.dependencies]
python = "^3.8"
Expand Down

0 comments on commit a706a59

Please sign in to comment.