aboutsummaryrefslogtreecommitdiff
path: root/.venv/lib/python3.12/site-packages/networkx/generators/tests/test_triads.py
blob: 463844be23a07f71375873bbc71e09c402d51118 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""Unit tests for the :mod:`networkx.generators.triads` module."""

import pytest

from networkx import triad_graph


def test_triad_graph():
    G = triad_graph("030T")
    assert [tuple(e) for e in ("ab", "ac", "cb")] == sorted(G.edges())


def test_invalid_name():
    with pytest.raises(ValueError):
        triad_graph("bogus")