From 523d68a25cb01fa80f1b1f65e7b1c2bd25699d14 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sat, 16 Aug 2025 23:04:54 +0100 Subject: [PATCH] gnu: python-elementpath: Enable tests. * gnu/packages/xml.scm (python-elementpath): Enable tests. [arguments] : Use 'unittest. : Add 'set-locales. [native-inputs]: Add glibc-locales, python-lxml, and python-xmlschema-bootstrap. Change-Id: I9a48dc1e508a6701472890a17a3ed0cf95d051a8 --- gnu/packages/xml.scm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 5efcfcb6bc9a19a072fe1b844267fdc2dbc99052..7ad9882d50768181d0cb0f9e562fde513e22b8ac 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -1908,11 +1908,21 @@ The central program included in this package is @code{onsgmls}, which replaces (base32 "1yr5ka198p1c1yw0dpmvz5mvxr6b29mz64hb2vxax53fbmb97vc5")))) (build-system pyproject-build-system) - ;; The test suite is not run, to avoid a dependency cycle with - ;; python-xmlschema. - (arguments `(#:tests? #f)) + (arguments + (list + #:test-backend #~'unittest + #:phases + #~(modify-phases %standard-phases + ;; 10 tests fail with: locale.Error: unsupported locale setting. + (add-before 'check 'set-locales + (lambda* (#:key inputs #:allow-other-keys) + (setenv "GUIX_LOCPATH" + (search-input-directory inputs "lib/locale"))))))) (native-inputs - (list python-setuptools)) + (list glibc-locales + python-setuptools + python-lxml + python-xmlschema-bootstrap)) (home-page "https://github.com/sissaschool/elementpath") (synopsis "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml") (description