[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/28: gnu: python-pytest-mock: Cope with test warnings.
From: |
guix-commits |
Subject: |
08/28: gnu: python-pytest-mock: Cope with test warnings. |
Date: |
Sat, 22 Jan 2022 04:23:43 -0500 (EST) |
mbakke pushed a commit to branch master
in repository guix.
commit b62737097ca6c68bead5ae4e27d5098bb03e09cd
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Fri Jan 21 20:38:15 2022 +0100
gnu: python-pytest-mock: Cope with test warnings.
* gnu/packages/check.scm (python-pytest-mock)[source](modules, snippet): New
fields.
[arguments]: Increase test verbosity and remove obsolete workaround.
---
gnu/packages/check.scm | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 8b90929b4b..481c0332cd 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -25,7 +25,7 @@
;;; Copyright © 2017, 2019 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017 Nikita <nikita@n0.is>
;;; Copyright © 2015, 2017, 2018, 2020, 2021 Ricardo Wurmus
<rekado@elephly.net>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke
<marius@gnu.org>
+;;; Copyright © 2016-2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2017, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;; Copyright © 2019, 2021 Pierre Langlois <pierre.langlois@gmx.com>
@@ -1286,22 +1286,29 @@ reported in a previous test run.")
(origin
(method url-fetch)
(uri (pypi-uri "pytest-mock" version))
- (sha256 (base32
- "0qhfmd05z3g88bnwq6644jl6p5wy01i4yy7h8883z9jjih2pl8a0"))))
+ (sha256
+ (base32 "0qhfmd05z3g88bnwq6644jl6p5wy01i4yy7h8883z9jjih2pl8a0"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Some tests do a string match on Pytest output, and fails when
+ ;; warnings are present. Adjust to cope with warnings from
+ ;; third-party libraries (looking at you, pytest-asyncio).
+ '(substitute* "tests/test_pytest_mock.py"
+ (("1 passed in \\*")
+ "1 passed*")))))
(build-system python-build-system)
(arguments
- `(#:phases
+ '(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (add-installed-pythonpath inputs outputs)
;; Skip the assertion rewriting tests, which don't work in the
;; presence of read-only Python modules (a limitation of
;; Pytest). Also skip the "test_standalone_mock" test, which
;; can only work when 'python-mock' is not available
;; (currently propagated by Pytest 5).
- (invoke "pytest" "--assert=plain"
+ (invoke "pytest" "--assert=plain" "-vv"
"-k" "not test_standalone_mock")))))))
(native-inputs
(list python-pytest-asyncio python-setuptools-scm))
- branch master updated (e22957fc15 -> 97176b4d9c), guix-commits, 2022/01/22
- 03/28: gnu: Add pproxy., guix-commits, 2022/01/22
- 01/28: gnu: python-psycopg2: Update to 2.9.3., guix-commits, 2022/01/22
- 02/28: gnu: postgresql: Add 14.1., guix-commits, 2022/01/22
- 04/28: gnu: python-cython: Add 3.0.0a10., guix-commits, 2022/01/22
- 12/28: gnu: python-pandas: Remove old version., guix-commits, 2022/01/22
- 11/28: gnu: Add python-psycopg., guix-commits, 2022/01/22
- 14/28: gnu: python-tqdm: Update to 4.62.3., guix-commits, 2022/01/22
- 06/28: gnu: Add python-typeguard., guix-commits, 2022/01/22
- 08/28: gnu: python-pytest-mock: Cope with test warnings.,
guix-commits <=
- 07/28: gnu: python-tenacity: Update to 8.0.1., guix-commits, 2022/01/22
- 05/28: gnu: python-mypy: Update to 0.931., guix-commits, 2022/01/22
- 09/28: gnu: python-pytest-asyncio: Update to 0.17.2., guix-commits, 2022/01/22
- 17/28: gnu: python-flask: Update to 2.0.2., guix-commits, 2022/01/22
- 20/28: gnu: Deprecate python-flask-restplus., guix-commits, 2022/01/22
- 24/28: gnu: behave: Update to 1.2.7.dev2., guix-commits, 2022/01/22
- 10/28: gnu: Add python-psycopg-pool., guix-commits, 2022/01/22
- 18/28: gnu: python-flask-session: Update to 0.4.0., guix-commits, 2022/01/22
- 22/28: gnu: Add python-pytest-metadata., guix-commits, 2022/01/22
- 25/28: gnu: cwltool: Update to 3.1.20220119140128., guix-commits, 2022/01/22