diff options
author | ptrcnull <git@ptrcnull.me> | 2024-03-28 10:50:44 +0100 |
---|---|---|
committer | ptrcnull <git@ptrcnull.me> | 2024-03-28 10:50:44 +0100 |
commit | 9a2f9d62b357ef08ff974cbdd2a5e096495221f8 (patch) | |
tree | c6a4e4f21e860db9ba2c3d99fb9442cc1abe8422 | |
parent | d7fd78f6fb7a7e72a95c70aac3c6b8285d566116 (diff) |
-rw-r--r-- | community/py3-pylink-square/APKBUILD | 11 | ||||
-rw-r--r-- | community/py3-pylink-square/assertEquals.patch | 27 |
2 files changed, 34 insertions, 4 deletions
diff --git a/community/py3-pylink-square/APKBUILD b/community/py3-pylink-square/APKBUILD index 154cc1a6b9a..1675500ee8d 100644 --- a/community/py3-pylink-square/APKBUILD +++ b/community/py3-pylink-square/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Bart Ribbers <bribbers@disroot.org> pkgname=py3-pylink-square pkgver=1.2.0 -pkgrel=0 +pkgrel=1 pkgdesc="Python interface for SEGGER J-Link" url="https://github.com/Square/pylink" arch="noarch" @@ -17,9 +17,11 @@ makedepends=" py3-setuptools py3-wheel " -checkdepends="py3-mock" +checkdepends="py3-mock py3-pytest" subpackages="$pkgname-pyc" -source="https://pypi.python.org/packages/source/p/pylink-square/pylink-square-$pkgver.tar.gz" +source="https://pypi.python.org/packages/source/p/pylink-square/pylink-square-$pkgver.tar.gz + assertEquals.patch + " builddir="$srcdir/pylink-square-$pkgver" build() { @@ -31,7 +33,7 @@ build() { check() { python3 -m venv --clear --without-pip --system-site-packages .testenv .testenv/bin/python3 -m installer .dist/*.whl - .testenv/bin/python3 -m unittest discover -k 'not test_cp15_register_write_success and not test_jlink_restarted and not test_set_log_file_success' + .testenv/bin/python3 -m pytest -k 'not test_cp15_register_write_success and not test_jlink_restarted and not test_set_log_file_success' } package() { @@ -41,4 +43,5 @@ package() { sha512sums=" eb9164e7bf409a595f17edfc5352f4d361e96cf4f315d42874401918e3ec869fc5a63cf38c9f7fde1448dc967d8aec4e2f0ac1eeb05f276e4def4bbbf7ab821b pylink-square-1.2.0.tar.gz +30fcdab073e17f5c81f57e4f48485fa43a7fe9a5c55c2646e5ccb162630bea99b5855ab06277f06178fdd2eb8153382c9abfd5408aa8fe6c27e0123dbeec23a9 assertEquals.patch " diff --git a/community/py3-pylink-square/assertEquals.patch b/community/py3-pylink-square/assertEquals.patch new file mode 100644 index 00000000000..2911fc40d3b --- /dev/null +++ b/community/py3-pylink-square/assertEquals.patch @@ -0,0 +1,27 @@ +diff --git a/tests/unit/test_library.py b/tests/unit/test_library.py +index fb92f92..483c758 100644 +--- a/tests/unit/test_library.py ++++ b/tests/unit/test_library.py +@@ -987,5 +987,5 @@ class TestLibrary(unittest.TestCase): + # JLinkarmDlInfo has not been instantiated. +- self.assertEquals(0, mock_dlinfo_ctr.call_count) ++ self.assertEqual(0, mock_dlinfo_ctr.call_count) + # Fallback to "search by file name" has succeeded. +- self.assertEquals(1, mock_load_library.call_count) ++ self.assertEqual(1, mock_load_library.call_count) + self.assertEqual(directories[0], lib._path) +@@ -1031,5 +1031,5 @@ class TestLibrary(unittest.TestCase): + mock_find_library.assert_any_call('dl') +- self.assertEquals(2, mock_find_library.call_count) ++ self.assertEqual(2, mock_find_library.call_count) + # Called once in JLinkarmDlInfo and once in Library. +- self.assertEquals(2, mock_load_library.call_count) ++ self.assertEqual(2, mock_load_library.call_count) + # The dlinfo() dance silently failed, but will answer None resolved path. +@@ -1072,4 +1072,4 @@ class TestLibrary(unittest.TestCase): + mock_find_library.assert_any_call('dl') +- self.assertEquals(2, mock_find_library.call_count) +- self.assertEquals(2, mock_load_library.call_count) ++ self.assertEqual(2, mock_find_library.call_count) ++ self.assertEqual(2, mock_load_library.call_count) + |