From patchwork Tue Apr 20 05:22:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 28695 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 A4F1A27BC79; Tue, 20 Apr 2021 06:25:51 +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_H4,RCVD_IN_MSPIKE_WL,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 6035E27BC77 for ; Tue, 20 Apr 2021 06:25:48 +0100 (BST) Received: from localhost ([::1]:40038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYitP-00030P-Kj for patchwork@mira.cbaines.net; Tue, 20 Apr 2021 01:25:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYisl-0002FY-7Q for guix-patches@gnu.org; Tue, 20 Apr 2021 01:25:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41132) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYisk-0003ba-V8 for guix-patches@gnu.org; Tue, 20 Apr 2021 01:25:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lYisk-0007ff-RM for guix-patches@gnu.org; Tue, 20 Apr 2021 01:25:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47906] [PATCH 12/22] gnu: Add python-pytest-qt. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 20 Apr 2021 05:25:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47906 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47906@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 47906-submit@debbugs.gnu.org id=B47906.161889630529450 (code B ref 47906); Tue, 20 Apr 2021 05:25:06 +0000 Received: (at 47906) by debbugs.gnu.org; 20 Apr 2021 05:25:05 +0000 Received: from localhost ([127.0.0.1]:52664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYisd-0007dm-T9 for submit@debbugs.gnu.org; Tue, 20 Apr 2021 01:25:04 -0400 Received: from mout01.posteo.de ([185.67.36.65]:37339) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYisc-0007dN-Ex for 47906@debbugs.gnu.org; Tue, 20 Apr 2021 01:24:59 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id E4DA6240026 for <47906@debbugs.gnu.org>; Tue, 20 Apr 2021 07:24:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1618896292; bh=0XqMrY3fEXYkFmerj+/zPMAu7MEYY1CEzblpfTMIn3c=; h=From:To:Cc:Subject:Date:From; b=MhsMof5WK8yzgVe8VCTPaNKeAGb/OSpNWjLIB+1Ejnco5OoMOD5r2lP28BQqyDuF7 I7uI4TGXKen2Dz34n6uKe6fGIZBPZNxSAnzenMgdMbi8MtUUBFet1okv5gtGH2GxJL v4J31HHWbqkXPSdzIfRdTTVOpcVPT+S0PrYhNZjt4Tv9ByAv8k6T4A5j/6fLIyyjGn ZBGg+dw2GeqGWMJS424uBxun0Pxmfg03+g75k26rkKJpCzp3L1BFvtJExq0MZj5U+w MBiI304cHE8llcQTn6NFBeM+g0RLU2Qz1mReWHYV76Lp9MdXyInFFPsFFsjILpwB7t mVT1o13UfRcNQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FPXDz3V1xz6tmM; Tue, 20 Apr 2021 07:24:51 +0200 (CEST) From: Vinicius Monego Date: Tue, 20 Apr 2021 05:22:36 +0000 Message-Id: <20210420052246.470690-12-monego@posteo.net> In-Reply-To: <20210420052246.470690-1-monego@posteo.net> References: <20210420052246.470690-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-check.scm (python-pytest-qt): New variable. --- gnu/packages/python-check.scm | 39 ++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index bde836a931..db09197d41 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2020 Julien Lepiller ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020 Edouard Klein -;;; Copyright © 2020 Vinicius Monego +;;; Copyright © 2020, 2021 Vinicius Monego ;;; Copyright © 2020 Tanguy Le Carrour ;;; Copyright © 2021 Sharlatan Hellseher ;;; Copyright © 2021 Brendan Tildesley @@ -36,6 +36,7 @@ #:use-module (gnu packages python-build) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages qt) #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module (guix utils) @@ -1029,6 +1030,42 @@ variables in the @file{pytest.ini} file.") libraries.") (license license:expat))) +(define-public python-pytest-qt + (package + (name "python-pytest-qt") + (version "3.3.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-qt" version)) + (sha256 + (base32 "09c9psfn3zigpaw1l1cmynpa3csxa49wc2ih5lzl24skdkw0njvi")))) + (build-system python-build-system) + (arguments + `(#:test-target "pytest" + #:phases + (modify-phases %standard-phases + (add-before 'check 'set-qpa + (lambda _ + (setenv "QT_QPA_PLATFORM" "offscreen") + #t))))) + (propagated-inputs + `(("python-pyqt" ,python-pyqt))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-runner" ,python-pytest-runner) + ("python-setuptools-scm" ,python-setuptools-scm))) + (home-page "https://github.com/pytest-dev/pytest-qt") + (synopsis "Pytest support for PyQt and PySide applications") + (description + "@code{pytest-qt} is a Pytest plugin that allows programmers to write +tests for PyQt5 and PySide2 applications. + +The main usage is to use the @code{qtbot} fixture, responsible for handling +@code{qApp} creation as needed and provides methods to simulate user +interaction, like key presses and mouse clicks.") + (license license:expat))) + (define-public python-codacy-coverage (package (name "python-codacy-coverage")