forked from pool/python-pylink-square
- Fix tests for python 3.12
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylink-square?expand=0&rev=5
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 26 11:23:05 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Fix tests for python 3.12
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 14 21:05:14 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Thu Dec 14 21:05:14 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pylink-square
|
# spec file for package python-pylink-square
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -38,7 +38,7 @@ BuildRequires: fdupes
|
|||||||
Requires: python-psutil >= 5.2.2
|
Requires: python-psutil >= 5.2.2
|
||||||
Requires: python-six
|
Requires: python-six
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun):update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@@ -47,6 +47,8 @@ Python interface for SEGGER J-Link.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pylink-square-%{version}
|
%setup -q -n pylink-square-%{version}
|
||||||
|
sed -i 's/assertEquals/assertEqual/g' tests/unit/test_library.py
|
||||||
|
sed -i 's/\.called_once_with/.assert_called_once_with/g' tests/unit/test_jlink.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
@@ -67,6 +69,8 @@ find tests -type f -exec sed -i 's/import mock/import unittest.mock as mock/g' {
|
|||||||
IGNORED_CHECKS="test_initialize_windows"
|
IGNORED_CHECKS="test_initialize_windows"
|
||||||
IGNORED_CHECKS="${IGNORED_CHECKS} or test_unlock_kinetis_read_fail"
|
IGNORED_CHECKS="${IGNORED_CHECKS} or test_unlock_kinetis_read_fail"
|
||||||
IGNORED_CHECKS="${IGNORED_CHECKS} or test_unlock_kinetis_success"
|
IGNORED_CHECKS="${IGNORED_CHECKS} or test_unlock_kinetis_success"
|
||||||
|
# Fails because parameter order in assert_called_once_with
|
||||||
|
IGNORED_CHECKS="${IGNORED_CHECKS} or test_cp15_register_write_success or test_set_log_file_success"
|
||||||
%pytest -k "not (${IGNORED_CHECKS})"
|
%pytest -k "not (${IGNORED_CHECKS})"
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
Reference in New Issue
Block a user