- 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/package/show/devel:languages:python/python-munkres?expand=0&rev=14
This commit is contained in:
parent
c9a003f5b8
commit
bf6ae149be
@ -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>
|
Sat Mar 26 19:58:13 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -26,6 +26,9 @@ License: Apache-2.0
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://software.clapper.org/munkres/
|
URL: https://software.clapper.org/munkres/
|
||||||
Source: https://github.com/bmc/munkres/archive/release-%{version}.tar.gz
|
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}
|
BuildRequires: %{python_module setuptools}
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
@ -47,7 +50,7 @@ This particular implementation is based on
|
|||||||
http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html.
|
http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n munkres-release-%{version}
|
%autosetup -p1 -n munkres-release-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
21
test_profil_float_32bit.patch
Normal file
21
test_profil_float_32bit.patch
Normal 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],
|
Loading…
x
Reference in New Issue
Block a user