17
0

Accepting request 1160040 from home:Guillaume_G:branches:devel:languages:python:numeric

- Fix test for aarch64 with:
  * fix-check.patch

OBS-URL: https://build.opensuse.org/request/show/1160040
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-cotengra?expand=0&rev=3
This commit is contained in:
2024-03-21 09:31:31 +00:00
committed by Git OBS Bridge
parent 984e0756b1
commit f2d91e6080
3 changed files with 25 additions and 0 deletions

18
fix-check.patch Normal file
View File

@@ -0,0 +1,18 @@
diff --git a/tests/test_hypergraph.py b/tests/test_hypergraph.py
index 5260af0..eff1cd5 100644
--- a/tests/test_hypergraph.py
+++ b/tests/test_hypergraph.py
@@ -1,3 +1,4 @@
+import pytest
import cotengra as ctg
def test_shortest_distances():
@@ -14,7 +15,7 @@ def test_resistance_centrality():
inputs, output, _, size_dict = ctg.utils.lattice_equation([3, 3])
hg = ctg.HyperGraph(inputs, output, size_dict)
cents = hg.resistance_centrality()
- assert cents[0] == 0.0
+ assert cents[0] == pytest.approx(0.0)
assert 0.0 < cents[3] < 1.0
assert cents[4] == 1.0

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Mar 21 09:04:19 UTC 2024 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Fix test for aarch64 with:
* fix-check.patch
-------------------------------------------------------------------
Tue Feb 27 20:19:35 UTC 2024 - Ben Greiner <code@bnavigator.de>

View File

@@ -23,6 +23,7 @@ Summary: Hyper optimized contraction trees for large tensor networks and
License: Apache-2.0
URL: https://github.com/jcmgray/cotengra
Source: https://files.pythonhosted.org/packages/source/c/cotengra/cotengra-%{version}.tar.gz
Patch1: fix-check.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 45}
BuildRequires: %{python_module setuptools_scm >= 6.2}