[arch-commits] Commit in python-google-auth/trunk (PKGBUILD pytest5.patch)

Evangelos Foutras foutrelis at archlinux.org
Sat Nov 2 21:50:20 UTC 2019


    Date: Saturday, November 2, 2019 @ 21:50:19
  Author: foutrelis
Revision: 522268

Fix tests

Added:
  python-google-auth/trunk/pytest5.patch
Modified:
  python-google-auth/trunk/PKGBUILD

---------------+
 PKGBUILD      |    9 ++++++---
 pytest5.patch |   18 ++++++++++++++++++
 2 files changed, 24 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-11-02 21:50:11 UTC (rev 522267)
+++ PKGBUILD	2019-11-02 21:50:19 UTC (rev 522268)
@@ -14,9 +14,11 @@
 checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-mock' 'python2-mock'
               'python-requests' 'python2-requests' 'python-flask' 'python2-flask'
               'python-oauth2client' 'python2-oauth2client' 'python-pytest-localserver'
-              'python2-pytest-localserver')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/GoogleCloudPlatform/google-auth-library-python/archive/v$pkgver.tar.gz")
-sha512sums=('3becc5301d982532d59bf6c3d0c2ebe6ea8f53b6ebdbf71d2dfc622f7933c3472102af62e43c9292c7361d458e812e8af71c7d426efbfff282f3db96de1d3374')
+              'python2-pytest-localserver' 'python-cryptography' 'python2-cryptography')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/GoogleCloudPlatform/google-auth-library-python/archive/v$pkgver.tar.gz"
+        'pytest5.patch')
+sha512sums=('3becc5301d982532d59bf6c3d0c2ebe6ea8f53b6ebdbf71d2dfc622f7933c3472102af62e43c9292c7361d458e812e8af71c7d426efbfff282f3db96de1d3374'
+            '3df316f27b81b128798807dac69add8d99fcbad0ab157763cdc7d3c81535ee4a57b5dcec96e37a56e106dbb1f033ba83972c3073d18bd028b0124fc95aa56daa')
 
 prepare() {
   # Use system cert
@@ -23,6 +25,7 @@
   sed -i -e 's|certifi.where()|"/etc/ssl/certs/ca-certificates.crt"|' \
          -e 's|if certifi is not None:|if True:|' \
          google-auth-library-python-$pkgver/google/auth/transport/urllib3.py
+  patch -Np1 -d google-auth-library-python-$pkgver <pytest5.patch
   cp -a google-auth-library-python-$pkgver{,-py2}
 }
 

Added: pytest5.patch
===================================================================
--- pytest5.patch	                        (rev 0)
+++ pytest5.patch	2019-11-02 21:50:19 UTC (rev 522268)
@@ -0,0 +1,18 @@
+From 938e5d933aee963a6b28d6cf9e34e0634c8c4a29 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tomas.chvatal at gmail.com>
+Date: Fri, 26 Jul 2019 01:20:41 +0200
+Subject: [PATCH] Use new pytest api to keep building with pytest 5 (#353)
+
+diff --git a/tests/test__default.py b/tests/test__default.py
+index 3fb0fa1..d143479 100644
+--- a/tests/test__default.py
++++ b/tests/test__default.py
+@@ -92,7 +92,7 @@ def test__load_credentials_from_file_authorized_user_bad_format(tmpdir):
+ 
+ 
+ def test__load_credentials_from_file_authorized_user_cloud_sdk():
+-    with pytest.warns(UserWarning, matches='Cloud SDK'):
++    with pytest.warns(UserWarning, match='Cloud SDK'):
+         credentials, project_id = _default._load_credentials_from_file(
+             AUTHORIZED_USER_CLOUD_SDK_FILE)
+     assert isinstance(credentials, google.oauth2.credentials.Credentials)



More information about the arch-commits mailing list