From patchwork Mon Oct 25 23:16:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 34055 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 445EB27BBE3; Tue, 26 Oct 2021 00:18:32 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EF58227BBE1 for ; Tue, 26 Oct 2021 00:18:31 +0100 (BST) Received: from localhost ([::1]:39442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mf9Ed-0000g6-37 for patchwork@mira.cbaines.net; Mon, 25 Oct 2021 19:18:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mf9EB-0000c9-Qn for guix-patches@gnu.org; Mon, 25 Oct 2021 19:18:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33083) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mf9EB-0006rX-HU for guix-patches@gnu.org; Mon, 25 Oct 2021 19:18:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mf9EB-0006JI-D2 for guix-patches@gnu.org; Mon, 25 Oct 2021 19:18:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50021] [PATCH v2 7/8] gnu: python-translate-toolkit: Enable tests. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Oct 2021 23:18:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50021 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50021@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 50021-submit@debbugs.gnu.org id=B50021.163520384924189 (code B ref 50021); Mon, 25 Oct 2021 23:18:03 +0000 Received: (at 50021) by debbugs.gnu.org; 25 Oct 2021 23:17:29 +0000 Received: from localhost ([127.0.0.1]:44626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mf9DY-0006Hy-35 for submit@debbugs.gnu.org; Mon, 25 Oct 2021 19:17:29 -0400 Received: from mout02.posteo.de ([185.67.36.66]:33431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mf9DW-0006Hc-GF for 50021@debbugs.gnu.org; Mon, 25 Oct 2021 19:17:23 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id D810D240101 for <50021@debbugs.gnu.org>; Tue, 26 Oct 2021 01:17:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1635203836; bh=5RmghKRO5qDmlNvUP0BOkcPIUHviDB024CPp6CL3Q/Q=; h=From:To:Cc:Subject:Date:From; b=ObuuY0SAjotFR6P/+urhzWgH4Uw5hUibU6Bmk//BU1lWM2VMHCby5xdIOEc0IY++I 0zF9xLYYNHRfZGAirCrHnzOritQoje5oqsYtjflnxH0HrwIlzf2UgcKAozVb1US+LF bnuDeUI05bHRi3myZA7syPjQASiWBATxwGlzlYnK3xcstd7NVTxwQsfutIz0NAP0b6 191xysxojIgGG9ttOFV0k3txYlUwEisTh0yvelhyvwbeXLKJ9XFxf87lgXAL0ciXUt NkKQbp9wlQcEOWbN1UTSVY32GqjkX63cmUHVUQpV2ESUEacO+RjUgnHzdFXAMAP7Gx UWLkTPIvlvBmg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HdW7b5RNRz6tm6; Tue, 26 Oct 2021 01:17:15 +0200 (CEST) From: Vinicius Monego Date: Mon, 25 Oct 2021 23:16:15 +0000 Message-Id: <20211025231615.73660-7-monego@posteo.net> In-Reply-To: <20211025231615.73660-1-monego@posteo.net> References: <20211025231615.73660-1-monego@posteo.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-translate-toolkit)[arguments]: Remove #:tests?. <#:phases>: Add custom phase before 'check to delete some test files. Override 'check phase. [native-inputs]: Remove python-sphinx. Add python-fluent-syntax, python-iniparse, python-phply, python-ruamel.yaml, python-vobject. --- gnu/packages/python-xyz.scm | 42 +++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 93d0deb3f4..778e68f4f3 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -18566,16 +18566,40 @@ when data is updated. (sha256 (base32 "1l6gk3frjjbd6s0cyvk8qkmgpr4zf0jyxr9f5b73xqqk8mwp5p1f")))) (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-fluent-syntax" ,python-fluent-syntax) + ("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")