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
def test_probability_too_large(self): with pytest.raises(NetworkXError): duplication_divergence_graph(3, 2)
def test_probability_too_large(self): duplication_divergence_graph(3, 2)
def test_probability_too_small(self): duplication_divergence_graph(3, -1)
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)
def _generate_graph(self, n): return duplication_divergence_graph(n, self._params['p'])