comparison env/lib/python3.9/site-packages/networkx/tests/test_exceptions.py @ 0:4f3585e2f14b draft default tip

"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author shellac
date Mon, 22 Mar 2021 18:12:50 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4f3585e2f14b
1 import pytest
2 import networkx as nx
3
4 # smoke tests for exceptions
5
6
7 def test_raises_networkxexception():
8 with pytest.raises(nx.NetworkXException):
9 raise nx.NetworkXException
10
11
12 def test_raises_networkxerr():
13 with pytest.raises(nx.NetworkXError):
14 raise nx.NetworkXError
15
16
17 def test_raises_networkx_pointless_concept():
18 with pytest.raises(nx.NetworkXPointlessConcept):
19 raise nx.NetworkXPointlessConcept
20
21
22 def test_raises_networkxalgorithmerr():
23 with pytest.raises(nx.NetworkXAlgorithmError):
24 raise nx.NetworkXAlgorithmError
25
26
27 def test_raises_networkx_unfeasible():
28 with pytest.raises(nx.NetworkXUnfeasible):
29 raise nx.NetworkXUnfeasible
30
31
32 def test_raises_networkx_no_path():
33 with pytest.raises(nx.NetworkXNoPath):
34 raise nx.NetworkXNoPath
35
36
37 def test_raises_networkx_unbounded():
38 with pytest.raises(nx.NetworkXUnbounded):
39 raise nx.NetworkXUnbounded