From 8fa572e07ac96c50db267c2bcbc0979de2ceb19e Mon Sep 17 00:00:00 2001 From: J Pratt Date: Mon, 5 Feb 2024 18:29:20 +1100 Subject: [PATCH] Add assertion that the command under test is the expected UpdateCommand type --- tests/console/commands/test_update.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/console/commands/test_update.py b/tests/console/commands/test_update.py index 188af0bbdba..42da10ba945 100644 --- a/tests/console/commands/test_update.py +++ b/tests/console/commands/test_update.py @@ -5,6 +5,7 @@ import pytest from tests.helpers import get_package +from poetry.console.commands.update import UpdateCommand if TYPE_CHECKING: @@ -92,6 +93,7 @@ def test_update_sync_option_is_passed_to_the_installer( The --sync option is passed properly to the installer from update. """ tester = command_tester_factory("update", poetry=poetry_with_outdated_lockfile) + assert isinstance(tester.command, UpdateCommand) mocker.patch.object(tester.command.installer, "run", return_value=1) tester.execute("--sync")