gnu: python-flake8-polyfill: Honor tests? flag.

* gnu/packages/python-xyz.scm (python-flake8-polyfill)[arguments]:
Adjust custom 'check phase to honor the #:tests? flag.
This commit is contained in:
Efraim Flashner 2022-06-07 09:24:14 +03:00
parent 49a47bdcc5
commit 0fd5222ad6
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -10366,13 +10366,14 @@ (define-public python-flake8-polyfill
'(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(lambda* (#:key tests? #:allow-other-keys)
;; Be compatible with Pytest 4:
;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
(substitute* "setup.cfg"
(("\\[pytest\\]")
"[tool:pytest]"))
(invoke "py.test" "-v"))))))
(when tests?
(invoke "py.test" "-v")))))))
(propagated-inputs
(list python-flake8))
(native-inputs