diff options
author | Luis Aranguren | 2023-08-18 18:33:40 +1000 |
---|---|---|
committer | Luis Aranguren | 2023-08-18 18:33:40 +1000 |
commit | 0dae06a620b1a7d997fff299660862cab5600f78 (patch) | |
tree | 474e8b11c9f0c95c0a40fd4253f7ae0465cce88b | |
parent | 4099c399da0736fd09507cd1f10d9e05aabce7c0 (diff) | |
download | aur-0dae06a620b1a7d997fff299660862cab5600f78.tar.gz |
1.0.0-9 Patch fix 'TestRoot' has no attribute '_ld'
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rw-r--r-- | test_cbor_patch.diff | 59 |
3 files changed, 69 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = python-cbor pkgdesc = CBOR rfc7049 for Python pkgver = 1.0.0 - pkgrel = 8 + pkgrel = 9 url = https://github.com/brianolson/cbor_py arch = x86_64 license = Apache @@ -10,7 +10,9 @@ pkgbase = python-cbor depends = python source = python-cbor-1.0.0.tar.gz::https://github.com/brianolson/cbor_py/archive/b3af679e7cf3e12d50acb83c3c591fc5db9a658d.tar.gz source = python-cbor-issue6.patch::https://github.com/dol-sen/cbor_py/commit/abec52298fd89ed3f4c05ca4c0467c12df740f8d.patch + source = test_cbor_patch.diff sha256sums = d9211361e37363dfbf54fcb21d23e610aa25679609044844305c2ee5b80b78d9 sha256sums = 2f4fcc52fb28790d325355c51a3651ec8c39b85c8e6b415e3ac1394405dd0f2d + sha256sums = 7b39db5aa2e86f0cf93e16f08066c5ef1d466b06dc25d06fb402ed158ed78152 pkgname = python-cbor @@ -2,7 +2,7 @@ pkgname=python-cbor pkgver=1.0.0 -pkgrel=8 +pkgrel=9 # The commit that bumps cbor/VERSION.py to 1.0.0 _commit=b3af679e7cf3e12d50acb83c3c591fc5db9a658d pkgdesc='CBOR rfc7049 for Python' @@ -13,15 +13,19 @@ makedepends=(python-setuptools) depends=(python) checkdepends=(python-pytest) source=("$pkgname-$pkgver.tar.gz"::"https://github.com/brianolson/cbor_py/archive/$_commit.tar.gz" - "$pkgname-issue6.patch::https://github.com/dol-sen/cbor_py/commit/abec52298fd89ed3f4c05ca4c0467c12df740f8d.patch") + "$pkgname-issue6.patch::https://github.com/dol-sen/cbor_py/commit/abec52298fd89ed3f4c05ca4c0467c12df740f8d.patch" + "test_cbor_patch.diff") sha256sums=('d9211361e37363dfbf54fcb21d23e610aa25679609044844305c2ee5b80b78d9' - '2f4fcc52fb28790d325355c51a3651ec8c39b85c8e6b415e3ac1394405dd0f2d') + '2f4fcc52fb28790d325355c51a3651ec8c39b85c8e6b415e3ac1394405dd0f2d' + '7b39db5aa2e86f0cf93e16f08066c5ef1d466b06dc25d06fb402ed158ed78152') prepare() { cd cbor_py-$_commit sed -i 's#logger.warn(#logger.warning(#' cbor/tests/*.py # Backport a unmerged fix for tests https://github.com/brianolson/cbor_py/pull/19 patch -Np1 -i ../$pkgname-issue6.patch + # Patch for AttributeError: type object 'TestRoot' has no attribute '_ld' on tests + patch -Np1 -i ../../test_cbor_patch.diff } build() { diff --git a/test_cbor_patch.diff b/test_cbor_patch.diff new file mode 100644 index 000000000000..e7c68c35942c --- /dev/null +++ b/test_cbor_patch.diff @@ -0,0 +1,59 @@ +cls = <class 'cbor.tests.test_cbor.TestRoot'> + + @classmethod + def testable(cls): +> ok = (cls._ld[0] is not None) and (cls._ld[1] is not None) and (cls._ld[3] is not None) and (cls._ld[4] is not None) +E AttributeError: type object 'TestRoot' has no attribute '_ld' + +cbor/tests/test_cbor.py:63: AttributeError +===================================================================================================================================================== warnings summary ====================================================================================================================================================== +cbor/tests/test_cbor.py::TestCBORPyC::testable + /usr/lib/python3.11/unittest/case.py:678: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestRoot.testable of <class 'cbor.tests.test_cbor.TestCBORPyC'>>) + return self.run(*args, **kwds) + +cbor/tests/test_cbor.py::TestCPy::testable + /usr/lib/python3.11/site-packages/_pytest/python.py:198: PytestReturnNotNoneWarning: Expected None, but cbor/tests/test_cbor.py::TestCPy::testable returned False, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`? + warnings.warn( + +cbor/tests/test_cbor.py::TestPyC::testable + /usr/lib/python3.11/site-packages/_pytest/python.py:198: PytestReturnNotNoneWarning: Expected None, but cbor/tests/test_cbor.py::TestPyC::testable returned False, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`? + warnings.warn( + +cbor/tests/test_cbor.py::TestCC::testable + /usr/lib/python3.11/site-packages/_pytest/python.py:198: PytestReturnNotNoneWarning: Expected None, but cbor/tests/test_cbor.py::TestCC::testable returned False, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`? + warnings.warn( + +cbor/tests/test_cbor.py::TestPyPy::testable + /usr/lib/python3.11/site-packages/_pytest/python.py:198: PytestReturnNotNoneWarning: Expected None, but cbor/tests/test_cbor.py::TestPyPy::testable returned True, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`? + warnings.warn( + +cbor/tests/test_cbor.py::TestCBORPyPy::testable + /usr/lib/python3.11/unittest/case.py:678: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestRoot.testable of <class 'cbor.tests.test_cbor.TestCBORPyPy'>>) + return self.run(*args, **kwds) + +cbor/tests/test_cbor.py::TestCBORCPy::testable + /usr/lib/python3.11/unittest/case.py:678: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestRoot.testable of <class 'cbor.tests.test_cbor.TestCBORCPy'>>) + return self.run(*args, **kwds) + +cbor/tests/test_cbor.py::TestCBORCC::testable + /usr/lib/python3.11/unittest/case.py:678: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestRoot.testable of <class 'cbor.tests.test_cbor.TestCBORCC'>>) + return self.run(*args, **kwds) + +cbor/tests/test_objects.py::TestPyPy::testable + /usr/lib/python3.11/site-packages/_pytest/python.py:198: PytestReturnNotNoneWarning: Expected None, but cbor/tests/test_objects.py::TestPyPy::testable returned True, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`? + warnings.warn( + +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html +================================================================================================================================================== short test summary info ================================================================================================================================================== +FAILED cbor/tests/test_cbor.py::TestRoot::testable - AttributeError: type object 'TestRoot' has no attribute '_ld' + + +--- a/cbor/tests/test_cbor.py 2023-08-18 10:06:40.923167800 +1000 ++++ b/cbor/tests/test_cbor.py 2023-08-18 10:10:04.420155700 +1000 +@@ -43,6 +43,7 @@ + + class TestRoot(object): ++ _ld = [None, None, None, None, None] + @classmethod + def loads(cls, *args): + return cls._ld[0](*args) |