summaryrefslogtreecommitdiff
path: root/gnu/packages/python-check.scm
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-10-11 19:57:19 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-10-30 16:23:53 +0000
commitb6fcddc4134d8a6acb3df3725f39f62fdc2fd74c (patch)
tree24eeb4774030dc043caefd46dad9091dcb8eaec9 /gnu/packages/python-check.scm
parent405ec135a9bd47bdadb01ce84228d2ed7e3c7c32 (diff)
gnu: Add python-approvaltests.
* gnu/packages/python-check.scm (python-approvaltests): New variable. Change-Id: I6a8d5138c059936f1535bd0dce09b1cc9fac8f06 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/python-check.scm')
-rw-r--r--gnu/packages/python-check.scm45
1 files changed, 45 insertions, 0 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index e15ab8e2e27..d215d8788e8 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -80,6 +80,7 @@
#:use-module (gnu packages version-control)
#:use-module (gnu packages web)
#:use-module (gnu packages xml)
+ #:use-module (gnu packages xdisorg)
#:use-module (gnu packages xorg)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system pyproject)
@@ -191,6 +192,50 @@ most situations.")
@code{python-approvaltests}.")
(license license:asl2.0)))
+(define-public python-approvaltests
+ (package/inherit python-approval-utilities
+ (name "python-approvaltests")
+ (version (package-version python-approval-utilities))
+ (arguments
+ (list
+ #:tests? #f ; Tests are run in the python-approvaltests package.
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (substitute* "setup/setup_utils.py"
+ (("version=get_version\\(\\),")
+ (format #f "version=~s," #$version))
+ (("\\(get_parent_directory\\(\\)\\.parent / ")
+ "Path("))
+ (rename-file "setup/setup.py"
+ "setup.py")
+ ;; Assume the chdir.
+ (substitute* "setup.py"
+ (("\\.\\.")
+ "."))
+ (rename-file "setup/setup_utils.py"
+ "setup_utils.py"))))))
+ (native-inputs (list python-setuptools))
+ (propagated-inputs
+ (list python-allpairspy
+ python-approval-utilities
+ python-beautifulsoup4
+ python-empty-files
+ python-mock
+ python-pyperclip
+ python-pytest
+ python-testfixtures
+ python-typing-extensions))
+ (home-page "https://github.com/approvals/ApprovalTests.Python")
+ (synopsis "Assertion/verification library to aid testing")
+ (description
+ "This package provides tools verify objects that require more than a
+simple assert including long strings, large arrays, and complex hash
+structures and objects, i.e. when you need a more granular look at the test
+failure.")
+ (license license:asl2.0)))
+
(define-public python-assay
;; No release yet.
(let ((commit "74617d70e77afa09f58b3169cf496679ac5d5621")