From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 4CszAiBo+2VJMwEAqHPOHw:P1 (envelope-from ) for ; Wed, 20 Mar 2024 23:50:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 4CszAiBo+2VJMwEAqHPOHw (envelope-from ) for ; Wed, 20 Mar 2024 23:50:08 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=CaQnCwxz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710975007; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=IbIJNBD7Hdfib15JRvxyAx4h1Q75u3yH2J8hGF+00c4=; b=WlRsFDaJNiqR55YW3BVyuHZ/rWbP98dQU6x4KK3GeAEd2ychHdgWW0TztY+d/tlXzCxRKZ jh0moBKB6cyFGJxo+iHe2P/DGHAiJBDLIuxM3Qmoh5j4kreHFfUhZP0NITauue6V8iPNKg SM+bKnXhNYajLJObauNfhNOgYCr3tAjixjnzMRfvpwze2SE9I10kapZtHfQGGCNoJzo8gJ uBcPubg2UYCn5y4+tvazLo2TKSeUVFRye/NgoV0VA2xuNK5Gqs664gcFy1s8xdiBcoFphJ 4nDzZIjIOb2s6tETwzMV30wr6kZGgXiXDRH0p0hZEcH9eyN4NvjBmQ3OO69rBw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=CaQnCwxz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710975007; a=rsa-sha256; cv=none; b=nTbiJjuT+t7zbEpKXI3yOgAmM9i9VOxMLEgc3IBnhlc4wBmcDksKyvnEGNQkEOrwq/K4NE hZ+sFqgdPnUyBzvGCK1BvO8v8A/8J43KEfzc4y9QnktC6Rms+x86NzaUV+77vBfKuy9c9v 7vGQJGTqL5CGoptdMhvpdmTh+leC+gvC8z0qqd3iBlfTv0+rVKXVpbffbwN0PH7Si/JxP0 RaKryaP4A20vyq9oquJWwg3mA0CkTNk8kfO7IbSfYalPcxHor0MA0yH8j54dtAlydr2Qc8 SOs70y4a2JHQ8G4IMZWift0W3wjhPikdaaGyo9dtxsOiyKuXgaA2DperAmvrrg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 890DA6EC0A for ; Wed, 20 Mar 2024 23:50:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rn4Tk-0002cc-4C; Wed, 20 Mar 2024 18:32:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rn4T7-0001kH-27 for guix-patches@gnu.org; Wed, 20 Mar 2024 18:31:38 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rn4T6-0005uw-67 for guix-patches@gnu.org; Wed, 20 Mar 2024 18:31:32 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rn4Tj-0005mz-OA for guix-patches@gnu.org; Wed, 20 Mar 2024 18:32:11 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69924] [PATCH 47/49] gnu: Add python-pytest-examples. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 20 Mar 2024 22:32:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69924 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69924@debbugs.gnu.org Cc: Sharlatan Hellseher Received: via spool by 69924-submit@debbugs.gnu.org id=B69924.171097392722156 (code B ref 69924); Wed, 20 Mar 2024 22:32:11 +0000 Received: (at 69924) by debbugs.gnu.org; 20 Mar 2024 22:32:07 +0000 Received: from localhost ([127.0.0.1]:36613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rn4Te-0005l2-JT for submit@debbugs.gnu.org; Wed, 20 Mar 2024 18:32:07 -0400 Received: from mail-lj1-f170.google.com ([209.85.208.170]:49306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rn4Sc-0005Zh-RV for 69924@debbugs.gnu.org; Wed, 20 Mar 2024 18:31:03 -0400 Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2d288bac3caso4805201fa.2 for <69924@debbugs.gnu.org>; Wed, 20 Mar 2024 15:30:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710973757; x=1711578557; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IbIJNBD7Hdfib15JRvxyAx4h1Q75u3yH2J8hGF+00c4=; b=CaQnCwxzhAyKhciDvpHkzGUtz7/nlGP1UW79NTemTmVAu98AFXCFEyus38Tu5UHkf2 jVPXEq5Zqa5hdi/yllwZAyNw2z9HnSNv7+eo2AaimBBnSsGan3PiDDrzST/qzaQbFE8e P+rLuCQaXRipX0MjNqg0G26mQ/d/61CiE3QlhMw21vJVkJ3v8RSVa8oqLpPT5i4R5wIC JASYHoVjbORiw6gGAebZqrDedDjm/kuDCltet2M+eTOtOM0NfsqAcgI0k87DT5V5v0lv OoXikK8uY12T+2aX+5wIXrGdpOVr3wLwdgsoMqiQzKoi9BgCW0/nW6qiaGxXdcQC4SNH UXNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710973757; x=1711578557; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IbIJNBD7Hdfib15JRvxyAx4h1Q75u3yH2J8hGF+00c4=; b=tq8odESVm/boXx2owp8DP1RsGiEGNCZyzsaL4wwAmRPLn6KJQ4Qe1eNbWq/gh2MBi0 mf2/ePFXQz70lYiYDHi+2+Gbno6RY8GX5pnPf9+t7rDUVcJ2bBe5Xc36B/7t4KRIrcWX dl5vl6dMNw2Q9Tsz8slyDFMNOsjfN0Cap7IsdX9G3XRWGUV5z3HHDEpic4AcyvTdFDOV etdQjnJciT6mIDOpLR7CM9hlACbu3+rofl7duMC9Cch7FSRQHoSJ1hmmvLCP1OXRXfbX 7CxwBoCH+hK+VT976j96A0qcNQD2RPM0WNc0rxZ/vZH8nLGsJdTsGzZM4k3Vil+U/KWZ Tgyw== X-Gm-Message-State: AOJu0Yx1bjQHWbXljcAYFNdOQRg0SPZc5ctrSQYFTgFcY7AKT8SKhquO i3XEnUMYzpUpbrT1OgsMzNGO3erWzbpo/hUFcDDj4rj/DdGmwqU07Q9hFDlTQF4= X-Google-Smtp-Source: AGHT+IGMU4s+uOCPDhl40NTfEB3e0mdSCbZNNkV/dvgh4CZ/yqMxBR8UsTSDAgty1rNzcFTiNjDrug== X-Received: by 2002:a05:651c:b08:b0:2d4:37ca:92d1 with SMTP id b8-20020a05651c0b0800b002d437ca92d1mr166462ljr.42.1710973757115; Wed, 20 Mar 2024 15:29:17 -0700 (PDT) Received: from localhost.localdomain (cpc100856-bagu15-2-0-cust368.1-3.cable.virginm.net. [82.25.93.113]) by smtp.gmail.com with ESMTPSA id fm22-20020a05600c0c1600b004147266a37dsm543921wmb.30.2024.03.20.15.29.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 15:29:16 -0700 (PDT) From: Sharlatan Hellseher Date: Wed, 20 Mar 2024 22:28:17 +0000 Message-ID: <36d73335b3bd72c9c94bff9b29e0a0217c9e2af5.1710967275.git.sharlatanus@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.72 X-Spam-Score: -3.72 X-Migadu-Queue-Id: 890DA6EC0A X-Migadu-Scanner: mx11.migadu.com X-TUID: PnQOCIW5h09/ * gnu/packages/check.scm (python-pytest-examples): New variable. Change-Id: I8199a7d7294c3b04134474f9f116468ac327cba8 --- gnu/packages/check.scm | 72 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 9ce21b05ba..fee330a1ce 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1377,6 +1377,78 @@ (define-public python-pytest-dotenv from a .env file before running tests.") (license license:expat))) +(define-public python-pytest-examples + (package + (name "python-pytest-examples") + (version "0.0.10") + (source + (origin + ;; No tests in the PyPI tarball. + (method git-fetch) + (uri (git-reference + (url "https://github.com/pydantic/pytest-examples") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0lwxgyfj6lnkhmrvb6kzfskpwfz70kxnhnjvyl3l65k568c4wb4c")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "-k" + (string-append + ;; Disable tests requiring pthon-ruff. + "not test_ruff" + " and not test_ruff_config" + " and not test_ruff_offset" + " and not test_ruff_ok" + " and not test_ruff_error" + " and not test_update_files" + " and not test_cases_update[simple.md]" + " and not test_cases_update[dataclass_indent.md]" + " and not test_cases_update[long_python_lines.py]" + " and not test_cases_update[simple.py]" + " and not test_cases_update[python_class.py]" + " and not test_cases_update[call_twice.md]" + " and not test_insert_print[example/README.md:3-33]" + " and not test_insert_print[example/README.md:37-40]" + " and not test_insert_print[example/README.md:44-47]" + " and not test_insert_print[example/README.md:49-66]" + " and not test_python_self[example/test_example.py:28-31]" + " and not test_python_self[example/test_example.py:40-43]" + " and not test_python_self_change_docstyle[example/test_example.py:28-31]" + " and not test_python_self_change_docstyle[example/test_example.py:40-43]")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "pyproject.toml" + ;; XXX: Removing ruff from required packages to pass Sanity + ;; check, add it back when it's available. + (("'ruff>=0.0.258',") "") + ;; black>=23 + ((">=23") ">22"))))))) + (propagated-inputs + ;; TODO: Add python-ruff once it has been packaged. + (list python-black python-pytest)) + (native-inputs + (list python-hatchling)) + (home-page "https://pypi.org/project/pytest-examples/") + (synopsis "Pytest plugin for testing examples in docstrings and markdown files") + (description + "Pytest-examples provides functionality for testing Python code examples +in docstrings and markdown files, with its main features being: + +@itemize +@item lint code examples using ruff and black +@item run code examples +@item run code examples and check print statements are inlined correctly in +the code +@item It can also update code examples in place to format them and insert or +update print statements +@end itemize") + (license license:expat))) + (define-public python-pytest-httpserver (package (name "python-pytest-httpserver") -- 2.41.0