aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-08-27 17:57:03 +0200
committerRicardo Wurmus <rekado@elephly.net>2021-08-30 18:29:56 +0200
commit76b5a14ad5677794b93fbf7014821258620f5258 (patch)
tree1749583546f6329cf711c9a70400ab1e59b8540c
parentc7d5e1a24c4805f02b7d9dd87cc8810264bdc7d2 (diff)
downloadguix-76b5a14ad5677794b93fbf7014821258620f5258.tar.gz
guix-76b5a14ad5677794b93fbf7014821258620f5258.zip
gnu: Add python-pytest-mock-3.
* gnu/packages/check.scm (python-pytest-mock-3): New variable.
-rw-r--r--gnu/packages/check.scm27
1 files changed, 27 insertions, 0 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index b49f9de157..4e1b8e802c 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1307,6 +1307,33 @@ same arguments.")
`(("python2-mock" ,python2-mock)
,@(package-propagated-inputs base))))))
+(define-public python-pytest-mock-3
+ (package
+ (inherit python-pytest-mock)
+ (version "3.6.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest-mock" version))
+ (sha256
+ (base32
+ "0qhfmd05z3g88bnwq6644jl6p5wy01i4yy7h8883z9jjih2pl8a0"))))
+ (properties '())
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ ;; Make the installed plugin discoverable by Pytest.
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-vv"
+ ;; TODO: these fail for unclear reasons
+ "-k"
+ (string-append
+ "not test_standalone_mock"
+ " and not test_detailed_introspection_async"))))))))))
+
(define-public python-pytest-xdist
(package
(name "python-pytest-xdist")