[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50021] [PATCH 6/7] gnu: python-translate-toolkit: Enable tests.
From: |
Vinicius Monego |
Subject: |
[bug#50021] [PATCH 6/7] gnu: python-translate-toolkit: Enable tests. |
Date: |
Thu, 12 Aug 2021 01:31:22 +0000 |
* gnu/packages/python-xyz.scm (python-translate-toolkit)[arguments]: Remove
\#:tests?.
[native-inputs]: Remove python-sphinx. Add python-iniparse, python-phply,
python-ruamel.yaml, python-vobject.
---
gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++++++--------
1 file changed, 32 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index fbacc02c14..0e17657ce9 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17772,16 +17772,39 @@ when data is updated.
(sha256
(base32 "0q0qvs4sk1yhbsl9ja8ivvw0083bvfylbhnbbnx17833qmd83imb"))))
(build-system python-build-system)
- (native-inputs
- `(("python-pytest" ,python-pytest)
- ("python-sphinx" ,python-sphinx)))
- (propagated-inputs
(arguments
- ;; TODO: tests are not run, because they end with
- ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
- ;; 'parse_funcs'
- ;; during test setup.
- `(#:tests? #f))
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; TODO: Requires python-cheroot.
+ (delete-file "translate/services/test_tmserver.py")
+ ;; Requires gaupol which brings in video dependencies.
+ (delete-file "translate/storage/test_subtitles.py")))
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest" "-k"
+ (string-append
+ ;; XMLSchemaParseError.
+ "not test_open_office_to_xliff"
+ " and not test_po_to_xliff"
+ ;; AssertionError.
+ " and not test_language_iso_fullname"
+ " and not test_country_iso_name"
+ " and not test_language_iso_name"
+ " and not test_timezones"
+ ;; FIXME: Requires msgfmt from gettext, but
+ ;; libgettextpo.so is not found by setup.py.
+ " and not test_output"))))))))
+ (native-inputs
+ `(("python-iniparse" ,python-iniparse)
+ ("python-phply" ,python-phply)
+ ("python-pytest" ,python-pytest)
+ ("python-ruamel.yaml" ,python-ruamel.yaml)
+ ("python-vobject" ,python-vobject)))
+ (propagated-inputs
`(("python-lxml" ,python-lxml)))
(home-page "https://toolkit.translatehouse.org")
(synopsis "Tools and API for translation and localization engineering")
--
2.30.2
- [bug#50021] [PATCH 0/7] Update python-translate-toolkit., Vinicius Monego, 2021/08/11
- [bug#50021] [PATCH 1/7] gnu: Add python-phply., Vinicius Monego, 2021/08/11
- [bug#50021] [PATCH 2/7] gnu: Add python-iniparse., Vinicius Monego, 2021/08/11
- [bug#50021] [PATCH 3/7] gnu: Remove virtaal., Vinicius Monego, 2021/08/11
- [bug#50021] [PATCH 4/7] gnu: python-translate-toolkit: Update to 3.3.6., Vinicius Monego, 2021/08/11
- [bug#50021] [PATCH 6/7] gnu: python-translate-toolkit: Enable tests.,
Vinicius Monego <=
- [bug#50021] [PATCH 5/7] gnu: Remove python2-translate-toolkit., Vinicius Monego, 2021/08/11
- [bug#50021] [PATCH 7/7] gnu: python-diff-match-patch: Update to 20200713., Vinicius Monego, 2021/08/11