mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
community/py3-pylink-square: fix tests with python 3.12
This commit is contained in:
parent
d7fd78f6fb
commit
9a2f9d62b3
@ -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
|
||||
"
|
||||
|
27
community/py3-pylink-square/assertEquals.patch
Normal file
27
community/py3-pylink-square/assertEquals.patch
Normal file
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user