File size: 144 Bytes
17c6d62
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
import pytest

import networkx as nx


def test_smetric():
    G = nx.Graph([(1, 2), (2, 3), (2, 4), (1, 4)])
    assert nx.s_metric(G) == 19.0