avoid test failure seen on rawhide
File
"/builddir/build/BUILD/networkx-1.8.1/site-packages/networkx/algorithms/assortativity/correlation.py",
line 118, in
Failed example:
r
Expected:
-0.5
Got:
-0.50000000000000011
This commit is contained in:
parent
e23a982be1
commit
0b52a2805e
@ -21,6 +21,7 @@ Source1: http://networkx.github.io/documentation/latest/_downloads/networ
|
|||||||
Source2: http://networkx.github.io/documentation/latest/_downloads/networkx_tutorial.pdf
|
Source2: http://networkx.github.io/documentation/latest/_downloads/networkx_tutorial.pdf
|
||||||
Source3: http://networkx.github.io/documentation/latest/_downloads/networkx-documentation.zip
|
Source3: http://networkx.github.io/documentation/latest/_downloads/networkx-documentation.zip
|
||||||
Patch0: optional-modules.patch
|
Patch0: optional-modules.patch
|
||||||
|
Patch1: test-rounding-fix.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
Requires: %{name}-core = %{version}-%{release}
|
Requires: %{name}-core = %{version}-%{release}
|
||||||
@ -165,6 +166,7 @@ Documentation for networkx
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n networkx-%{version}
|
%setup -q -n networkx-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
# Fix permissions
|
# Fix permissions
|
||||||
find examples -type f -perm /0111 | xargs chmod a-x
|
find examples -type f -perm /0111 | xargs chmod a-x
|
||||||
|
|||||||
14
test-rounding-fix.patch
Normal file
14
test-rounding-fix.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
This was seen intermittently
|
||||||
|
|
||||||
|
diff -Naur networkx-1.8.1.orig/networkx/algorithms/assortativity/correlation.py networkx-1.8.1/networkx/algorithms/assortativity/correlation.py
|
||||||
|
--- networkx-1.8.1.orig/networkx/algorithms/assortativity/correlation.py 2013-08-04 13:53:31.000000000 +0000
|
||||||
|
+++ networkx-1.8.1/networkx/algorithms/assortativity/correlation.py 2014-03-17 11:11:25.710772149 +0000
|
||||||
|
@@ -115,7 +115,7 @@
|
||||||
|
--------
|
||||||
|
>>> G=nx.path_graph(4)
|
||||||
|
>>> r=nx.degree_pearson_correlation_coefficient(G)
|
||||||
|
- >>> r
|
||||||
|
+ >>> print("%.1f"%r)
|
||||||
|
-0.5
|
||||||
|
|
||||||
|
Notes
|
||||||
Loading…
Reference in New Issue
Block a user