Exemple #1
0
 def test_final_size(self):
     N = 10
     n = 5
     p = 0.5
     q = 0.5
     G = partial_duplication_graph(N, n, p, q)
     assert len(G) == N
     G = partial_duplication_graph(N, n, p, q, seed=42)
     assert len(G) == N
 def test_final_size(self):
     N = 10
     n = 5
     p = 0.5
     q = 0.5
     G = partial_duplication_graph(N, n, p, q)
     assert_equal(len(G), N)
     G = partial_duplication_graph(N, n, p, q, seed=42)
     assert_equal(len(G), N)
Exemple #3
0
 def test_initial_clique_size(self):
     N = 10
     n = 10
     p = 0.5
     q = 0.5
     G = partial_duplication_graph(N, n, p, q)
     assert len(G) == n
 def test_invalid_initial_size(self):
     N = 5
     n = 10
     p = 0.5
     q = 0.5
     G = partial_duplication_graph(N, n, p, q)
     assert_equal(len(G), n)
Exemple #5
0
 def test_invalid_initial_size(self):
     with pytest.raises(NetworkXError):
         N = 5
         n = 10
         p = 0.5
         q = 0.5
         G = partial_duplication_graph(N, n, p, q)
Exemple #6
0
 def test_invalid_initial_size(self):
     N = 5
     n = 10
     p = 0.5
     q = 0.5
     G = partial_duplication_graph(N, n, p, q)
     assert_equal(len(G), n)
Exemple #7
0
 def test_final_size(self):
     N = 10
     n = 5
     p = 0.5
     q = 0.5
     G = partial_duplication_graph(N, n, p, q)
     assert_equal(len(G), N)