예제 #1
0
 def test_final_size(self):
     G = duplication_divergence_graph(3, 1)
     assert len(G) == 3
     G = duplication_divergence_graph(3, 1, seed=42)
     assert len(G) == 3
예제 #2
0
 def test_probability_too_large(self):
     with pytest.raises(NetworkXError):
         duplication_divergence_graph(3, 2)
예제 #3
0
 def test_probability_too_large(self):
     duplication_divergence_graph(3, 2)
예제 #4
0
 def test_probability_too_small(self):
     duplication_divergence_graph(3, -1)
예제 #5
0
 def test_final_size(self):
     G = duplication_divergence_graph(3, 1)
     assert_equal(len(G), 3)
     G = duplication_divergence_graph(3, 1, seed=42)
     assert_equal(len(G), 3)
예제 #6
0
 def _generate_graph(self, n):
     return duplication_divergence_graph(n, self._params['p'])
예제 #7
0
 def test_probability_too_small(self):
     duplication_divergence_graph(3, -1)
예제 #8
0
 def test_probability_too_large(self):
     duplication_divergence_graph(3, 2)
예제 #9
0
 def test_final_size(self):
     G = duplication_divergence_graph(3, 1)
     assert_equal(len(G), 3)
     G = duplication_divergence_graph(3, 1, seed=42)
     assert_equal(len(G), 3)