From d76e0a36f93b41bac2d42b85fa80079784cd0b76 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 27 Oct 2021 11:01:41 +0300 Subject: gnu: python-pytest-toolbox: Honor #:tests? flag. * gnu/packages/python-check.scm (python-pytest-toolbox)[arguments]: Adjust custom 'check phase to honor the #:tests? flag. --- gnu/packages/python-check.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'gnu/packages/python-check.scm') diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 7c2920fabe..9ae697d85f 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -1129,12 +1129,13 @@ (define-public python-pytest-toolbox '(#:phases (modify-phases %standard-phases (replace 'check - (lambda* (#:key inputs outputs #:allow-other-keys) - (substitute* "setup.cfg" - ((".*timeout.*") "")) - ;; Make the installed plugin discoverable by Pytest. - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv")))))) + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (substitute* "setup.cfg" + ((".*timeout.*") "")) + ;; Make the installed plugin discoverable by Pytest. + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv"))))))) (native-inputs `(("python-pydantic" ,python-pydantic) ("python-pytest" ,python-pytest) -- cgit v1.2.3