Fixed database typo and removed unnecessary class identifier.
This commit is contained in:
parent
00ad49a143
commit
45fb349a7d
5098 changed files with 952558 additions and 85 deletions
|
@ -0,0 +1,18 @@
|
|||
import networkx as nx
|
||||
|
||||
|
||||
def test_reversed():
|
||||
G = nx.DiGraph()
|
||||
G.add_edge("A", "B")
|
||||
|
||||
# no exception
|
||||
with nx.utils.reversed(G):
|
||||
pass
|
||||
assert "B" in G["A"]
|
||||
|
||||
# exception
|
||||
try:
|
||||
with nx.utils.reversed(G):
|
||||
raise Exception
|
||||
except:
|
||||
assert "B" in G["A"]
|
Loading…
Add table
Add a link
Reference in a new issue