diff options
| author | Aric Hagberg <aric.hagberg@gmail.com> | 2011-12-07 17:57:10 -0700 |
|---|---|---|
| committer | Aric Hagberg <aric.hagberg@gmail.com> | 2011-12-07 17:57:10 -0700 |
| commit | 4331cbc4eacf11d62b2ccf38efdfbec6edd65895 (patch) | |
| tree | a50b20d5b22c4a8523f5249c9b49119d5be3b757 /networkx/algorithms/community/tests | |
| parent | c9188c78da82cbe49e8f47871194597c48b81328 (diff) | |
| download | networkx-4331cbc4eacf11d62b2ccf38efdfbec6edd65895.tar.gz | |
Raise error if k < 2.
Addresses #652
Diffstat (limited to 'networkx/algorithms/community/tests')
| -rw-r--r-- | networkx/algorithms/community/tests/test_kclique.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/networkx/algorithms/community/tests/test_kclique.py b/networkx/algorithms/community/tests/test_kclique.py index 60be1754..8debca68 100644 --- a/networkx/algorithms/community/tests/test_kclique.py +++ b/networkx/algorithms/community/tests/test_kclique.py @@ -40,3 +40,7 @@ def test_zachary(): assert set(k_clique_communities(z, 4)) == zachary_k4_ground_truth assert set(k_clique_communities(z, 5)) == zachary_k5_ground_truth assert set(k_clique_communities(z, 6)) == zachary_k6_ground_truth + +@raises(nx.NetworkXError) +def test_bad_k(): + c = list(k_clique_communities(nx.Graph(),1)) |
