[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#47906] [PATCH 12/22] gnu: Add python-pytest-qt.
From: |
Vinicius Monego |
Subject: |
[bug#47906] [PATCH 12/22] gnu: Add python-pytest-qt. |
Date: |
Tue, 20 Apr 2021 05:22:36 +0000 |
* 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 <julien@lepiller.eu>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
-;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
@@ -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")
--
2.31.1
- [bug#47906] [PATCH 00/22] Add Spyder, Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 01/22] gnu: Add python-spyder-kernels., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 02/22] gnu: Add python-textdistance., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 03/22] gnu: Add python-three-merge., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 04/22] gnu: Add python-pyls-black., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 05/22] gnu: Add python-pyls-spyder., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 07/22] gnu: python-qtconsole: Update to 5.0.3., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 06/22] gnu: python-watchdog: Update to 1.0.2., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 09/22] gnu: Add python-tinycss., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 11/22] gnu: python-language-server: Enable tests., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 12/22] gnu: Add python-pytest-qt.,
Vinicius Monego <=
- [bug#47906] [PATCH 13/22] gnu: Add python-qtawesome., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 10/22] gnu: Add python-qstylizer., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 08/22] gnu: python-qtconsole: Enable tests., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 14/22] gnu: Add python-qtsass., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 16/22] gnu: Add python-easyprocess., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 15/22] gnu: python-qdarkstyle: Update to 3.0.2., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 19/22] gnu: Add python-pytest-xvfb., Vinicius Monego, 2021/04/20
- [bug#47906] [PATCH 17/22] gnu: Add python-entrypoint2., Vinicius Monego, 2021/04/20