aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-04-06 09:16:07 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-05-12 12:45:34 -0400
commit1702331d016eba117124299b68ab77cc1ed22270 (patch)
tree00343b0f0749bfd802c9b26c8ebaed928cbe2e6a /gnu
parenta749fbea4e5f0f3faaff60b64625921225df2dbb (diff)
downloadguix-1702331d016eba117124299b68ab77cc1ed22270.tar.gz
guix-1702331d016eba117124299b68ab77cc1ed22270.zip
gnu: Add python-pytest-randomly.
* gnu/packages/check.scm (python-pytest-randomly): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/check.scm41
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index e3523d77dc..c67a6f2675 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1242,6 +1242,47 @@ tests. Tests can be rerun in a specific order by passing a seed value
reported in a previous test run.")
(license license:expat)))
+(define-public python-pytest-randomly
+ (package
+ (name "python-pytest-randomly")
+ (version "3.11.0")
+ (source (origin
+ (method git-fetch) ;no tests in pypi archive
+ (uri (git-reference
+ (url "https://github.com/pytest-dev/pytest-randomly")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1sjgq49g8f8973vhmzrim79b6wz29a765n99azjk1maimqh7mmik"))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; The tests validating ordering fail, as well as as two
+ ;; others, for unknown reasons (see:
+ ;; https://github.com/pytest-dev/pytest-randomly/issues/454).
+ (invoke "pytest" "-vv" "-k"
+ (string-append
+ "not reordered "
+ "and not test_it_runs_before_stepwise "
+ "and not test_entrypoint_injection"))))))))
+ (native-inputs (list python-coverage
+ python-factory-boy
+ python-faker
+ python-numpy
+ python-pytest-xdist))
+ (propagated-inputs (list python-importlib-metadata python-pytest))
+ (home-page "https://github.com/pytest-dev/pytest-randomly")
+ (synopsis "Pytest plugin to randomly order tests")
+ (description "This is a Pytest plugin to randomly order tests and control
+Python's @code{random.seed}.")
+ (license license:expat)))
+
(define-public python-pytest-runner
(package
(name "python-pytest-runner")