[bug#75660] gnu: Add python-pytest-snapshot.

Message ID 87jzarwxtj.fsf@pisemsky.site
State New
Headers
Series [bug#75660] gnu: Add python-pytest-snapshot. |

Commit Message

Evgeny Pisemsky Jan. 18, 2025, 10:40 p.m. UTC
  
  

Comments

Sharlatan Hellseher Feb. 8, 2025, 6:05 p.m. UTC | #1
Hi,

I've reset it to python-check.

Pushed to master as 8010d73407205a63f2f27e719007ee9975ea8602.

--
Oleg
  

Patch

From ee9e9c8cfd57a08a92263da5d6bec877bb8f2887 Mon Sep 17 00:00:00 2001
Message-ID: <ee9e9c8cfd57a08a92263da5d6bec877bb8f2887.1737239654.git.mail@pisemsky.site>
From: Evgeny Pisemsky <mail@pisemsky.site>
Date: Sun, 19 Jan 2025 01:33:03 +0300
Subject: [PATCH] gnu: Add python-pytest-snapshot.

* gnu/packages/check.scm (python-pytest-snapshot): New variable.

Change-Id: I3cdf14a0da20e7f8e80f82e1b02f822eb5b26ad5
---
 gnu/packages/check.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index e28564c0b0..b2e0458c49 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -53,6 +53,7 @@ 
 ;;; Copyright © 2024 Navid Afkhami <navid.afkhami@mdc-berlin.de>
 ;;; Copyright © 2024 gemmaro <gemmaro.dev@gmail.com>
 ;;; Copyright © 2024 Ashvith Shetty <ashvithshetty10@gmail.com>
+;;; Copyright © 2025 Evgeny Pisemsky <mail@pisemsky.site>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4321,6 +4322,32 @@  (define-public python-pytest-tornado5
 markers to simplify testing of asynchronous tornado applications.")
     (license license:asl2.0)))
 
+(define-public python-pytest-snapshot
+  (package
+    (name "python-pytest-snapshot")
+    (version "0.9.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-snapshot" version))
+       (sha256
+        (base32 "1wxp9pv5yqpj3fk450ld1mjhhdxyvssgi6gqxyghz1iyphx3q0f7"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      ;; Skip failing test. Related upstream issue:
+      ;; https://github.com/joseph-roitman/pytest-snapshot/issues/71
+      #:test-flags #~(list "-k" "not test_assert_match_failure_bytes")))
+    (propagated-inputs (list python-pytest))
+    (native-inputs (list python-setuptools python-setuptools-scm python-wheel))
+    (home-page "https://github.com/joseph-roitman/pytest-snapshot")
+    (synopsis "Pytest plugin for snapshot testing")
+    (description
+     "This package provides a plugin for snapshot testing with pytest.  It
+can be used to test that the value of an expression does not change
+unexpectedly.")
+    (license license:expat)))
+
 (define-public guile-proba
   (package
     (name "guile-proba")

base-commit: 42295555ca9648e894569f40e9b28768be3f788a
-- 
2.47.1