HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux host 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: w230 (1248)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/networkx/tests/test_exceptions.py
import pytest

import networkx as nx

# smoke tests for exceptions


def test_raises_networkxexception():
    with pytest.raises(nx.NetworkXException):
        raise nx.NetworkXException


def test_raises_networkxerr():
    with pytest.raises(nx.NetworkXError):
        raise nx.NetworkXError


def test_raises_networkx_pointless_concept():
    with pytest.raises(nx.NetworkXPointlessConcept):
        raise nx.NetworkXPointlessConcept


def test_raises_networkxalgorithmerr():
    with pytest.raises(nx.NetworkXAlgorithmError):
        raise nx.NetworkXAlgorithmError


def test_raises_networkx_unfeasible():
    with pytest.raises(nx.NetworkXUnfeasible):
        raise nx.NetworkXUnfeasible


def test_raises_networkx_no_path():
    with pytest.raises(nx.NetworkXNoPath):
        raise nx.NetworkXNoPath


def test_raises_networkx_unbounded():
    with pytest.raises(nx.NetworkXUnbounded):
        raise nx.NetworkXUnbounded