From 3ff5f9b3dd05a464b8260717be50d46153d53961 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sun, 16 Mar 2025 19:53:51 +0000 Subject: [PATCH] gnu: python-pint: Enable all tests. * gnu/packages/python-xyz.scm (python-pint): Enable all tests, adjust style, use G-expressions. [arguments] : Try to run all tests. : Add 'pre-check. [native-inputs]: Remove python-pytest-benchmark and python-pytest-cov. Change-Id: Ie6e8b37f6fd66b2c0e18fdd382190d8fd379c46d --- gnu/packages/python-xyz.scm | 49 ++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index d7661ead8d79073f25d7deabace45d687fdacb53..fe30c1bc554ecf03e8055e2e5a09b0d07500fe9f 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -2156,32 +2156,35 @@ Markdown. All extensions are found under the module namespace of pymdownx.") (package (name "python-pint") (version "0.24.4") - (source (origin - (method url-fetch) - (uri (pypi-uri "pint" version)) - (sha256 - (base32 "100vp5jg2sqj5wxaflj1rqjv2pk4fd55l2h2sdn7m0vlnlwm89rm")))) + (source + (origin + (method url-fetch) + (uri (pypi-uri "pint" version)) + (sha256 + (base32 "100vp5jg2sqj5wxaflj1rqjv2pk4fd55l2h2sdn7m0vlnlwm89rm")))) (build-system pyproject-build-system) (arguments (list - #:test-flags - '(list "--ignore=pint/testsuite/benchmarks" - "-k" (string-append - ;; This test tries to write to $HOME/.cache/pint. - "not test_auto" - ;; Our pytest can't match RuntimeWarning for some reason. - ;; Note: python-pint@0.24.4 would work around this, too. - " and not test_nonnumeric_magnitudes" - ;; Fails with "Group USCSLengthInternational already - ;; present in registry" - " and not test_load_definitions_stage_2")))) - (native-inputs - (list python-pytest python-pytest-benchmark python-pytest-cov - python-pytest-mpl python-pytest-subtests - python-setuptools python-setuptools-scm python-wheel)) - (propagated-inputs - (list python-flexcache python-flexparser - python-platformdirs python-typing-extensions)) + #:test-flags #~(list "--ignore=pint/testsuite/benchmarks") + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda _ + ;; PermissionError: [Errno 13] Permission denied: + ;; '/homeless-shelter' + (setenv "HOME" "/tmp")))))) + (native-inputs + (list python-pytest + python-pytest-mpl + python-pytest-subtests + python-setuptools + python-setuptools-scm + python-wheel)) + (propagated-inputs + (list python-flexcache + python-flexparser + python-platformdirs + python-typing-extensions)) (home-page "https://github.com/hgrecco/pint") (synopsis "Physical quantities module") (description