Date: Wednesday, April 5, 2023 @ 19:13:19
Author: felixonmars
Revision: 1437929
archrelease: copy trunk to community-staging-any
Added:
python-responses/repos/community-staging-any/
python-responses/repos/community-staging-any/PKGBUILD
(from rev 1437926, python-responses/trunk/PKGBUILD)
python-responses/repos/community-staging-any/pytest5.patch
(from rev 1437926, python-responses/trunk/pytest5.patch)
---------------+
PKGBUILD | 37 +++++++++++++++++++++++++++++++++++++
pytest5.patch | 28 ++++++++++++++++++++++++++++
2 files changed, 65 insertions(+)
Copied: python-responses/repos/community-staging-any/PKGBUILD (from rev
1437926, python-responses/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-05 19:13:19 UTC (rev 1437929)
@@ -0,0 +1,37 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=python-responses
+pkgver=0.23.1
+pkgrel=2
+pkgdesc='A utility library for mocking out the `requests` Python library.'
+arch=('any')
+license=('Apache')
+url='https://github.com/getsentry/responses'
+depends=('python-requests' 'python-urllib3' 'python-yaml')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest' 'python-pytest-asyncio'
'python-pytest-httpserver' 'python-tomli'
+ 'python-tomli-w')
+source=("https://github.com/getsentry/responses/archive/$pkgver/$pkgname-$pkgver.tar.gz")
+sha512sums=('589bb2b6e5f259ec56ae8e4575f9c7dbfc915cf5ed622c9cb48492f34e13035164daea3806c7393533217237dbabf99e436754e9944f518bbfc5658391cc2e84')
+
+prepare() {
+ cd responses-$pkgver
+ sed -i '/types-PyYAML/d' setup.py
+}
+
+build() {
+ cd responses-$pkgver
+ python setup.py build
+}
+
+check() {
+ cd responses-$pkgver
+ pytest
+}
+
+package() {
+ cd responses-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+}
+
+# vim:set ts=2 sw=2 et:
Copied: python-responses/repos/community-staging-any/pytest5.patch (from rev
1437926, python-responses/trunk/pytest5.patch)
===================================================================
--- community-staging-any/pytest5.patch (rev 0)
+++ community-staging-any/pytest5.patch 2023-04-05 19:13:19 UTC (rev 1437929)
@@ -0,0 +1,28 @@
+From b9c17412445530298eb28917c1ef3a8f7cff971c Mon Sep 17 00:00:00 2001
+From: Brandon Hong <[email protected]>
+Date: Wed, 9 Oct 2019 15:18:56 +0800
+Subject: [PATCH] Fix testcase test_assert_all_requests_are_fired failure
+
+Pytest 5.0.0 changed ExceptionInfo object's str() to returns the same as
repr().
+(See, item #5412 of
https://docs.pytest.org/en/latest/changelog.html#pytest-5-0-0-2019-06-28)
+This patch fixes the test failure by comparing expectation with str() result of
+ExceptionInfo's value member instaed of object itself.
+
+Signed-off-by: Brandon Hong <[email protected]>
+---
+ test_responses.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test_responses.py b/test_responses.py
+index 4740dfb..c2a4f01 100644
+--- a/test_responses.py
++++ b/test_responses.py
+@@ -701,7 +701,7 @@ def run():
+ with responses.RequestsMock(assert_all_requests_are_fired=True)
as m:
+ m.add(responses.GET, "http://example.com", body=b"test")
+ assert "http://example.com" in str(excinfo.value)
+- assert responses.GET in str(excinfo)
++ assert responses.GET in str(excinfo.value)
+
+ # check that assert_all_requests_are_fired default to True
+ with pytest.raises(AssertionError):