Accepting request 972151 from devel:languages:python

- Add test_profil_float_32bit.patch to skip test_profil_float
  test which fails on 32bit systems (gh#bmc/munkres#40).

OBS-URL: https://build.opensuse.org/request/show/972151
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-munkres?expand=0&rev=6
This commit is contained in:
Dominique Leuenberger 2022-04-22 19:54:57 +00:00 committed by Git OBS Bridge
commit 48550a762c
3 changed files with 31 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Apr 22 10:38:15 UTC 2022 - Matej Cepl <mcepl@suse.com>
- Add test_profil_float_32bit.patch to skip test_profil_float
test which fails on 32bit systems (gh#bmc/munkres#40).
-------------------------------------------------------------------
Sat Mar 26 19:58:13 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -26,6 +26,9 @@ License: Apache-2.0
Group: Development/Languages/Python
URL: https://software.clapper.org/munkres/
Source: https://github.com/bmc/munkres/archive/release-%{version}.tar.gz
# PATCH-{FIX|FEATURE}-{OPENSUSE|SLE|UPSTREAM} name-of-file.patch bsc#[0-9]+ mcepl@suse.com
# this patch makes things totally awesome
Patch0: test_profil_float_32bit.patch
BuildRequires: %{python_module setuptools}
# SECTION test requirements
BuildRequires: %{python_module pytest}
@ -47,7 +50,7 @@ This particular implementation is based on
http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html.
%prep
%setup -q -n munkres-release-%{version}
%autosetup -p1 -n munkres-release-%{version}
%build
%python_build

View File

@ -0,0 +1,21 @@
---
test/test_munkres.py | 4 ++++
1 file changed, 4 insertions(+)
--- a/test/test_munkres.py
+++ b/test/test_munkres.py
@@ -1,3 +1,5 @@
+import platform
+
from munkres import Munkres, DISALLOWED, UnsolvableMatrix
import munkres
import pytest
@@ -156,6 +158,8 @@ def test_profit():
profit = sum([profit_matrix[row][column] for row, column in indices])
assert profit == 392
+@pytest.mark.skipif(platform.architecture()[0] == "32bit",
+ reason="Doesn't work on 32bit systems, gh#bmc/munkres#40")
def test_profit_float():
profit_matrix = [[94.01, 66.02, 100.03, 18.04, 48.05],
[51.06, 63.07, 97.08, 79.09, 11.1],