[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
147/397: gnu: Add python-inline-snapshot.
From: |
guix-commits |
Subject: |
147/397: gnu: Add python-inline-snapshot. |
Date: |
Thu, 16 Jan 2025 04:30:19 -0500 (EST) |
rekado pushed a commit to branch python-team
in repository guix.
commit 8852549d10637e5052a33c50165cf48704145db0
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Fri Jan 3 20:14:17 2025 +0100
gnu: Add python-inline-snapshot.
* gnu/packages/python-check.scm (python-inline-snapshot): New variable.
Change-Id: I4a6734d437a3bfaf764dd6d379a6af5b3da62a79
---
gnu/packages/python-check.scm | 61 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 7e4c903fc2..16820458af 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -123,6 +123,67 @@
Python with a fluent API.")
(license license:bsd-3)))
+(define-public python-inline-snapshot
+ (package
+ (name "python-inline-snapshot")
+ (version "0.18.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "inline_snapshot" version))
+ (sha256
+ (base32 "09pqgz4phal2pjkv03wg3gvj7jr89rrb93rfw4hd2x9v8px4mqqv"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-flags
+ ;; Missing "freezer" fixture
+ '(list "--ignore=tests/test_external.py"
+ "--ignore=tests/test_pytest_plugin.py"
+ "-k"
+ (string-append
+ "not test_trailing_comma"
+ ;; Cannot use inline-snapshop when xdist is available.
+ " and not test_xdist"
+ " and not test_xdist_disabled"
+ " and not test_xdist_and_disable"
+ " and not test_typing"))))
+ (propagated-inputs (list python-asttokens
+ python-black
+ python-click
+ python-executing
+ python-mkdocs
+ python-rich
+ python-tomli
+ python-typing-extensions))
+ (native-inputs
+ (list python-dirty-equals
+ python-freezegun
+ python-hatchling
+ python-pydantic
+ python-pytest
+ python-pytest-mock
+ python-pytest-subtests))
+ (home-page "https://pypi.org/project/inline-snapshot/")
+ (synopsis "Golden master/snapshot/approval testing library")
+ (description
+ "This package can be used for different things:
+
+@enumerate
+@item golden master/approval/snapshot testing. The idea is that you have a
+ function with a currently unknown result and you want to write a tests, which
+ ensures that the result does not change during refactoring.
+@item Compare things which are complex like lists with lot of numbers or
+ complex data structures.
+@item Things which might change during the development like error messages.
+@end enumerate
+
+@code{inline-snapshot} automates the process of recording, storing and
+updating the value you want to compare with. The value is converted with
+@code{repr()} and stored in the source file as argument of the
+@code{snapshot()} function.")
+ (license license:expat)))
+
(define-public python-robotframework-jsonlibrary
(package
(name "python-robotframework-jsonlibrary")
- 132/397: gnu: Add python-pyogrio., (continued)
- 132/397: gnu: Add python-pyogrio., guix-commits, 2025/01/16
- 135/397: gnu: awscli: Update to 1.36.32., guix-commits, 2025/01/16
- 126/397: gnu: Add python-joserfc., guix-commits, 2025/01/16
- 136/397: gnu: awscli-2: Remove obsolete build phase., guix-commits, 2025/01/16
- 137/397: gnu: python-flask-wtf: Update to 1.2.2., guix-commits, 2025/01/16
- 141/397: gnu: python-pillow: Use pyproject-build-system., guix-commits, 2025/01/16
- 134/397: gnu: python-botocore: Update to 1.35.91., guix-commits, 2025/01/16
- 138/397: gnu: awscli-2: Run tests., guix-commits, 2025/01/16
- 143/397: gnu: python-pillow: Update to 11.1.0., guix-commits, 2025/01/16
- 144/397: gnu: python-pillow-simd: Update to 10.0.1.post0., guix-commits, 2025/01/16
- 147/397: gnu: Add python-inline-snapshot.,
guix-commits <=
- 148/397: gnu: rust-codspeed-2: Update to 2.7.2., guix-commits, 2025/01/16
- 152/397: gnu: python-pydantic-core: Update to 2.27.2., guix-commits, 2025/01/16
- 153/397: gnu: python-pydantic-2: Update to 2.10.4., guix-commits, 2025/01/16
- 154/397: gnu: Add python-rich-toolkit., guix-commits, 2025/01/16
- 389/397: gnu: python-glom: Update to 24.11.0., guix-commits, 2025/01/16
- 352/397: gnu: python-hiredis: Update to 3.1.0., guix-commits, 2025/01/16
- 384/397: gnu: python-imap-tools: Update to 1.9.0., guix-commits, 2025/01/16
- 362/397: gnu: python-hyperkitty: Update to 1.3.12., guix-commits, 2025/01/16
- 360/397: gnu: Add python-django-q-rollbar., guix-commits, 2025/01/16
- 367/397: gnu: python-stpipe: Add missing inputs., guix-commits, 2025/01/16