Skip to content

Commit

Permalink
test: avoid failed tests due to non connected graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeff committed Feb 25, 2019
1 parent 7c7f681 commit 1e1a55f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pygsp/tests/test_graphs.py
Expand Up @@ -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()
Expand All @@ -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)

Expand Down

0 comments on commit 1e1a55f

Please sign in to comment.