From patchwork Fri Oct 13 19:18:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Gamblin X-Patchwork-Id: 32161 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7175C46CA1 for ; Fri, 13 Oct 2023 19:18:42 +0000 (UTC) Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) by mx.groups.io with SMTP id smtpd.web11.47554.1697224717735240786 for ; Fri, 13 Oct 2023 12:18:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=f+HuEjO/; spf=pass (domain: baylibre.com, ip: 209.85.167.181, mailfrom: tgamblin@baylibre.com) Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-3af604c3f8fso1451450b6e.1 for ; Fri, 13 Oct 2023 12:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1697224716; x=1697829516; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=06yYwZrKntjrNlDgsiILjxlKOMDBLtjE5eEBvu2IgNc=; b=f+HuEjO/7rf3O7sydBnPJye33iDhrrArUxQZpfsX7EUuvMht0kOtNFwRDnJjGjTjOV KQE26+0zqLyDytOyHJYC54JHYzZaeaf8wk24S4sAoVwLQ0CO0x82f+Ap+r8fV7/6igCq 8ECaxgICtklXcpIkwDnhvGhxs7l4+MBNHZ8q8BpNdlpGoXwlMLNhG/NL7QlRecjl2a2t 2t2rlGXIKS8PYCIidV+opU0C23gJEqGemSQEpgVknd1czd6aplzHHdZ/UajrCPX9OfAd KwGU0/bA3Vb7+0KqZsXGo2PiM4mXlO7jLCpnmx200j/Yh2ZiFiUlLmCgKzk5Ttv7Wvze jGCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697224716; x=1697829516; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=06yYwZrKntjrNlDgsiILjxlKOMDBLtjE5eEBvu2IgNc=; b=f6tggJsCSjA26XFeGHiBRm6gU1nT+BlAxndys7Ccya+/5m4d4+raBTrXly79WaefXf Qzu4EIoTNZna7jJpPQVkwgc7Gk/oRVZQdfAgtUK08uQegAMvz+if75QLeQUxOVHUMTrW IHqbq+cLLYVygU67TIb6Ir5pOJU6ePhjrfe7cTtipZWAM4CRNsxKMf87PxsE9RNvA9L2 SXd8omR+hHfFeOzj9REBjNvx7SMZyU++twhfx4J2LgXN3FpJY6FPOxth1coLCR8YOvmB jRZhGPsqYyrnGBbIBFdHT5HRWpvfrTAxhXumB7WDAn9zPWduCuXLyRwd3qsqdUfNGDn7 bc/g== X-Gm-Message-State: AOJu0Yyej7TYXRVmxgmyjIGG/vEDoAoR4dS4j6M0+4e5iKwfns5L5754 ojrXlUsUF6Ev7NhYtPxuF9k5oLBDOQsWiE+pULwWvw== X-Google-Smtp-Source: AGHT+IG/yKE/92yGNhuAXaAHW8pY0g8CjWWMHaH8nANmm+1wtdec8AwhGQB0wsqYT3mZ6YKxwBQT6A== X-Received: by 2002:a05:6808:1484:b0:3af:6c30:f206 with SMTP id e4-20020a056808148400b003af6c30f206mr38156688oiw.10.1697224716524; Fri, 13 Oct 2023 12:18:36 -0700 (PDT) Received: from megalith.cgocable.net ([2001:1970:5b1f:ab00:fc4e:ec42:7e5d:48dd]) by smtp.gmail.com with ESMTPSA id h10-20020ac846ca000000b00417db2593bdsm831580qto.72.2023.10.13.12.18.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 12:18:36 -0700 (PDT) From: Trevor Gamblin To: openembedded-devel@lists.openembedded.org Subject: [meta-python][PATCH v2] python3-pytest-mock: disable broken ptests Date: Fri, 13 Oct 2023 15:18:35 -0400 Message-ID: <20231013191835.2193271-1-tgamblin@baylibre.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 13 Oct 2023 19:18:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/105493 Two introspection-related ptests are consistently failing. For now, disable them so that a clean ptest run is available. Signed-off-by: Trevor Gamblin --- v2 adds the missing python3-pytest-asyncio dependency needed for all non-skipped tests to pass. ...t_mock-skip-args-introspection-tests.patch | 38 +++++++++++++++++++ .../python/python3-pytest-mock_3.11.1.bb | 2 + 2 files changed, 40 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-pytest-mock/0001-test_pytest_mock-skip-args-introspection-tests.patch diff --git a/meta-python/recipes-devtools/python/python3-pytest-mock/0001-test_pytest_mock-skip-args-introspection-tests.patch b/meta-python/recipes-devtools/python/python3-pytest-mock/0001-test_pytest_mock-skip-args-introspection-tests.patch new file mode 100644 index 0000000000..f024e79d93 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pytest-mock/0001-test_pytest_mock-skip-args-introspection-tests.patch @@ -0,0 +1,38 @@ +From e184fb950ad3b52c5c16438d39fe4d516c784e30 Mon Sep 17 00:00:00 2001 +From: Trevor Gamblin +Date: Thu, 12 Oct 2023 17:32:40 -0400 +Subject: [PATCH] test_pytest_mock: skip args introspection tests + +Disable these two tests for now so that python3-pytest-mock can have +successful ptest runs. + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Trevor Gamblin +--- + tests/test_pytest_mock.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py +index 3d53241..157b6c3 100644 +--- a/tests/test_pytest_mock.py ++++ b/tests/test_pytest_mock.py +@@ -581,6 +581,7 @@ def test_assert_called_wrapper(mocker: MockerFixture) -> None: + stub.assert_called() + + ++@pytest.mark.skip("Async not correctly detected, skip for now") + @pytest.mark.usefixtures("needs_assert_rewrite") + def test_assert_called_args_with_introspection(mocker: MockerFixture) -> None: + stub = mocker.stub() +@@ -597,6 +598,7 @@ def test_assert_called_args_with_introspection(mocker: MockerFixture) -> None: + stub.assert_called_once_with(*wrong_args) + + ++@pytest.mark.skip("Async not correctly detected, skip for now") + @pytest.mark.usefixtures("needs_assert_rewrite") + def test_assert_called_kwargs_with_introspection(mocker: MockerFixture) -> None: + stub = mocker.stub() +-- +2.41.0 + diff --git a/meta-python/recipes-devtools/python/python3-pytest-mock_3.11.1.bb b/meta-python/recipes-devtools/python/python3-pytest-mock_3.11.1.bb index 69d74567c3..5dda1da469 100644 --- a/meta-python/recipes-devtools/python/python3-pytest-mock_3.11.1.bb +++ b/meta-python/recipes-devtools/python/python3-pytest-mock_3.11.1.bb @@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = " \ SRC_URI = " \ git://github.com/pytest-dev/pytest-mock;branch=main;protocol=https \ file://run-ptest \ + file://0001-test_pytest_mock-skip-args-introspection-tests.patch \ " SRCREV ?= "d3e73f2e93f7b93eba0a36e17e43bafd969da4fe" @@ -21,6 +22,7 @@ DEPENDS += "${PYTHON_PN}-setuptools-scm-native" RDEPENDS:${PN} += " \ python3-asyncio \ python3-pytest \ + python3-pytest-asyncio \ python3-unittest \ "