summaryrefslogtreecommitdiff
path: root/gnu/packages/python-check.scm
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2025-12-02 10:15:52 +0000
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-12-02 11:18:01 +0000
commit8d870bebc17435e3f28215c79c0c8b077a92c30e (patch)
tree88f27a7c41f8e08efd6f76a5519517fef8633e6a /gnu/packages/python-check.scm
parente12ba8c865fd73267ff081c97ddecd46351edb07 (diff)
gnu: python-pynose: Improve package.
* gnu/packages/python-check.scm (python-pynose): [arguments] <phases>: Use custom 'check. [native-inputs]: Remove python-wheel. [synopsis]: Adjust it to reflect the logic. [description]: Add more details from proejct's README and mention that it may be used as Nose replacement. Change-Id: Ib5b35803d8e5240433a86f57423d28691ec696e8
Diffstat (limited to 'gnu/packages/python-check.scm')
-rw-r--r--gnu/packages/python-check.scm40
1 files changed, 37 insertions, 3 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index ea2a0006f56..07f67362c6a 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -2104,11 +2104,45 @@ among others.")
(sha256
(base32 "0jbzmxnxmgf60158gpvfsp8j2cid6psfwj3j94vxv61z8wk4xnl1"))))
(build-system pyproject-build-system)
- (native-inputs (list python-setuptools python-wheel))
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ ;; A simple regression tests, taken from project's GitHub Actions,
+ ;; see: <.github/workflows/python-package.yml>.
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (with-output-to-file "nothing.py"
+ (const (display "def test_1(): pass\n")))
+ (invoke "pynose" "nothing.py" "--co" "-v")
+ (invoke "pynose" "nothing.py" "-v")
+ (invoke "nosetests" "nothing.py" "--co" "-v")
+ (invoke "nosetests" "nothing.py" "-v")
+ (delete-file "nothing.py")))))))
+ (native-inputs
+ (list python-setuptools))
(home-page "https://github.com/mdmintz/pynose")
- (synopsis "pynose fixes nose to extend unittest and make testing easier")
+ (synopsis "Unittest framework for Python")
(description
- "pynose fixes nose to extend unittest and make testing easier.")
+ "@code{pynose} is a maintained successor of deprecated @code{nose} unittest
+runner.
+Changes over @code{nose}:
+@itemize
+@item fixes @code{AttributeError: module 'collections' has no attribute 'Callable'}
+@item fixes @code{AttributeError: module 'inspect' has no attribute 'getargspec'}
+@item fixes @code{ImportError: cannot import name '_TextTestResult' from 'unittest'}
+@item fixes @code{RuntimeWarning: TestResult has no addDuration method}
+@item fixes @code{DeprecationWarning: pkg_resources is deprecated as an API}
+@item fixes all @code{flake8} issues from the original nose
+@item replaces the imp module with the newer importlib module
+@item the default logging level now hides @code{INFO} logs for less noise
+@item adds @code{--capture-logs} for hiding output from all logging levels
+@item adds @code{--logging-init} to use @code{logging.basicConfig(level)}
+@item the @code{-s} option is always active to see the output of @code{print()}
+@item adds @code{--capture-output} for hiding the output of @code{print()}
+@item adds @code{--co} as a shortcut to using @code{--collect-only}
+@end itemize")
(license license:lgpl2.0)))
(define-public python-pytest-aiohttp