From 1e1a55f3e8f08f258127397b27ab1de5bd71e7b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Defferrard?= Date: Mon, 25 Feb 2019 12:33:20 +0100 Subject: [PATCH] test: avoid failed tests due to non connected graphs --- pygsp/tests/test_graphs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pygsp/tests/test_graphs.py b/pygsp/tests/test_graphs.py index 5a3d1b14..7851ac60 100644 --- a/pygsp/tests/test_graphs.py +++ b/pygsp/tests/test_graphs.py @@ -421,10 +421,10 @@ def test_stochasticblockmodel(self): graphs.StochasticBlockModel(N=100, directed=False) graphs.StochasticBlockModel(N=100, self_loops=True) graphs.StochasticBlockModel(N=100, self_loops=False) - graphs.StochasticBlockModel(N=100, connected=True, n_try=100) + graphs.StochasticBlockModel(N=100, connected=True, seed=42) graphs.StochasticBlockModel(N=100, connected=False) self.assertRaises(ValueError, graphs.StochasticBlockModel, - N=100, p=0, q=0, connected=True, n_try=100) + N=100, p=0, q=0, connected=True) def test_airfoil(self): graphs.Airfoil() @@ -437,8 +437,8 @@ def test_davidsensornet(self): def test_erdosreny(self): graphs.ErdosRenyi(N=100, connected=False, directed=False) graphs.ErdosRenyi(N=100, connected=False, directed=True) - graphs.ErdosRenyi(N=100, connected=True, n_try=100, directed=False) - graphs.ErdosRenyi(N=100, connected=True, n_try=100, directed=True) + graphs.ErdosRenyi(N=100, connected=True, directed=False, seed=42) + graphs.ErdosRenyi(N=100, connected=True, directed=True, seed=42) G = graphs.ErdosRenyi(N=100, p=1, self_loops=True) self.assertEqual(G.W.nnz, 100**2)