File: test_exceptions.py

package info (click to toggle)
python-networkx 1.7~rc1-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,128 kB
  • sloc: python: 44,557; makefile: 135
file content (33 lines) | stat: -rw-r--r-- 804 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from nose.tools import raises
import networkx as nx

# smoke tests for exceptions

@raises(nx.NetworkXException)
def test_raises_networkx_exception():
    raise nx.NetworkXException

@raises(nx.NetworkXError)
def test_raises_networkx_error():
    raise nx.NetworkXError

@raises(nx.NetworkXPointlessConcept)
def test_raises_networkx_pointless_concept():
    raise nx.NetworkXPointlessConcept

@raises(nx.NetworkXAlgorithmError)
def test_raises_networkx_algorithm_error():
    raise nx.NetworkXAlgorithmError

@raises(nx.NetworkXUnfeasible)
def test_raises_networkx_unfeasible():
    raise nx.NetworkXUnfeasible

@raises(nx.NetworkXNoPath)
def test_raises_networkx_no_path():
    raise nx.NetworkXNoPath

@raises(nx.NetworkXUnbounded)
def test_raises_networkx_unbounded():
    raise nx.NetworkXUnbounded