diff options
author | Alimi Qudirah <qudrohbidemi@gmail.com> | 2022-10-27 08:51:43 +0100 |
---|---|---|
committer | Jarrod Millman <jarrod.millman@gmail.com> | 2022-11-01 10:28:24 -0700 |
commit | 3abf9b8ac162a64e047dd00f3a0c87ebf5e3c9f4 (patch) | |
tree | d8b230b08a0153430a9ac64064589da6ab2050df | |
parent | 4dcbf118be3613f4be02b1d2cf50890a1a225bc7 (diff) | |
download | networkx-3abf9b8ac162a64e047dd00f3a0c87ebf5e3c9f4.tar.gz |
Improve test coverage for multidigraph class (#6131)
* fixes #6036
* test load centrality
* test dispersion
* test dispersion
* dispersion test
* test dispersion
* bug-fixes-for-issue-6088
* deleted
* fixes-for-6119
-rw-r--r-- | networkx/classes/tests/test_multidigraph.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/networkx/classes/tests/test_multidigraph.py b/networkx/classes/tests/test_multidigraph.py index 52c82675..c951b480 100644 --- a/networkx/classes/tests/test_multidigraph.py +++ b/networkx/classes/tests/test_multidigraph.py @@ -285,6 +285,8 @@ class TestMultiDiGraph(BaseMultiDiGraphTester, _TestMultiGraph): assert G._adj == {0: {1: {0: {}}}, 1: {}} assert G._succ == {0: {1: {0: {}}}, 1: {}} assert G._pred == {0: {}, 1: {0: {0: {}}}} + with pytest.raises(ValueError, match="None cannot be a node"): + G.add_edge(None, 3) def test_add_edges_from(self): G = self.Graph() @@ -321,6 +323,8 @@ class TestMultiDiGraph(BaseMultiDiGraphTester, _TestMultiGraph): pytest.raises(nx.NetworkXError, G.add_edges_from, [(0, 1, 2, 3, 4)]) # not a tuple pytest.raises(TypeError, G.add_edges_from, [0]) + with pytest.raises(ValueError, match="None cannot be a node"): + G.add_edges_from([(None, 3), (3, 2)]) def test_remove_edge(self): G = self.K3 |