From a706a59dbab89725919e64b3252574950de24016 Mon Sep 17 00:00:00 2001 From: Bartosz Sokorski Date: Sun, 27 Oct 2024 17:27:10 +0100 Subject: [PATCH] Address CR issues --- tests/console/commands/test_check.py | 15 ++------------- tests/fixtures/pypi_reference/pyproject.toml | 7 +++++-- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/tests/console/commands/test_check.py b/tests/console/commands/test_check.py index 674f8e7865d..363ba6f1f06 100644 --- a/tests/console/commands/test_check.py +++ b/tests/console/commands/test_check.py @@ -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 diff --git a/tests/fixtures/pypi_reference/pyproject.toml b/tests/fixtures/pypi_reference/pyproject.toml index be26d4d7ddf..09e4872eb56 100644 --- a/tests/fixtures/pypi_reference/pyproject.toml +++ b/tests/fixtures/pypi_reference/pyproject.toml @@ -1,8 +1,11 @@ -[tool.poetry] +[project] name = "foobar" version = "0.1.0" description = "" -authors = ["Poetry Developer "] +authors = [ + { name = "Poetry Developer", email = "" } +] +dynamic = ["dependencies", "requires-python"] [tool.poetry.dependencies] python = "^3.8"