summaryrefslogtreecommitdiff
path: root/gnu/packages/check.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-04-06 00:28:29 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-05-12 12:45:32 -0400
commit9010b1adfd0c876e9a5971a373ae620378aca686 (patch)
tree4f060cb94687dce8847f122df0f3dcffec2a57f5 /gnu/packages/check.scm
parent59944e875af8be1f3501a5f9fd12c644cef4f9d5 (diff)
gnu: Add python-pytest-enabler.
* gnu/packages/check.scm (python-pytest-enabler): New variable.
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r--gnu/packages/check.scm30
1 files changed, 30 insertions, 0 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 135fd671a2..8ed53f7e27 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -2225,6 +2225,36 @@ failures.")
(description "Enable installed pytest plugins")
(license license:expat))))
+(define-public python-pytest-enabler
+ (package/inherit python-pytest-enabler-bootstrap
+ (arguments
+ (substitute-keyword-arguments
+ (package-arguments python-pytest-enabler-bootstrap)
+ ((#:tests? _ #f)
+ #t)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "pytest" "-vv" "tests"))))))))
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs python-pytest-enabler-bootstrap)
+ (replace "python-jaraco-context-bootstrap" python-jaraco-context)
+ (replace "python-jaraco-functools-bootstrap" python-jaraco-functools)))
+ (native-inputs
+ (modify-inputs (package-native-inputs python-pytest-enabler-bootstrap)
+ (append python-pytest
+ python-pytest-black
+ python-pytest-checkdocs
+ python-pytest-cov
+ python-pytest-flake8
+ python-pytest-mypy
+ python-types-toml)))
+ (properties (alist-delete 'hidden?
+ (package-properties
+ python-pytest-enabler-bootstrap)))))
+
(define-public python-pytest-freezegun
(package
(name "python-pytest-freezegun")