summaryrefslogtreecommitdiff
path: root/gnu/packages/python-check.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2025-01-03 20:14:17 +0100
committerRicardo Wurmus <rekado@elephly.net>2025-01-20 21:37:34 +0100
commitf49a67ec43bfd7fa0d6446b05312ffa94e67a741 (patch)
tree87e0ac95fb54c57c32352b86051dd020ac19d17e /gnu/packages/python-check.scm
parent09a68f8b4f6d1220b5238171d243ff19a1d494d5 (diff)
gnu: Add python-inline-snapshot.
* gnu/packages/python-check.scm (python-inline-snapshot): New variable. Change-Id: I4a6734d437a3bfaf764dd6d379a6af5b3da62a79
Diffstat (limited to 'gnu/packages/python-check.scm')
-rw-r--r--gnu/packages/python-check.scm61
1 files changed, 61 insertions, 0 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 7e4c903fc2e..16820458af0 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -123,6 +123,67 @@
123Python with a fluent API.") 123Python with a fluent API.")
124 (license license:bsd-3))) 124 (license license:bsd-3)))
125 125
126(define-public python-inline-snapshot
127 (package
128 (name "python-inline-snapshot")
129 (version "0.18.2")
130 (source
131 (origin
132 (method url-fetch)
133 (uri (pypi-uri "inline_snapshot" version))
134 (sha256
135 (base32 "09pqgz4phal2pjkv03wg3gvj7jr89rrb93rfw4hd2x9v8px4mqqv"))))
136 (build-system pyproject-build-system)
137 (arguments
138 (list
139 #:test-flags
140 ;; Missing "freezer" fixture
141 '(list "--ignore=tests/test_external.py"
142 "--ignore=tests/test_pytest_plugin.py"
143 "-k"
144 (string-append
145 "not test_trailing_comma"
146 ;; Cannot use inline-snapshop when xdist is available.
147 " and not test_xdist"
148 " and not test_xdist_disabled"
149 " and not test_xdist_and_disable"
150 " and not test_typing"))))
151 (propagated-inputs (list python-asttokens
152 python-black
153 python-click
154 python-executing
155 python-mkdocs
156 python-rich
157 python-tomli
158 python-typing-extensions))
159 (native-inputs
160 (list python-dirty-equals
161 python-freezegun
162 python-hatchling
163 python-pydantic
164 python-pytest
165 python-pytest-mock
166 python-pytest-subtests))
167 (home-page "https://pypi.org/project/inline-snapshot/")
168 (synopsis "Golden master/snapshot/approval testing library")
169 (description
170 "This package can be used for different things:
171
172@enumerate
173@item golden master/approval/snapshot testing. The idea is that you have a
174 function with a currently unknown result and you want to write a tests, which
175 ensures that the result does not change during refactoring.
176@item Compare things which are complex like lists with lot of numbers or
177 complex data structures.
178@item Things which might change during the development like error messages.
179@end enumerate
180
181@code{inline-snapshot} automates the process of recording, storing and
182updating the value you want to compare with. The value is converted with
183@code{repr()} and stored in the source file as argument of the
184@code{snapshot()} function.")
185 (license license:expat)))
186
126(define-public python-robotframework-jsonlibrary 187(define-public python-robotframework-jsonlibrary
127 (package 188 (package
128 (name "python-robotframework-jsonlibrary") 189 (name "python-robotframework-jsonlibrary")