Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/networkx/algorithms/tests/test_asteroidal.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 networkx as nx | |
2 | |
3 | |
4 def test_is_at_free(): | |
5 | |
6 is_at_free = nx.asteroidal.is_at_free | |
7 | |
8 cycle = nx.cycle_graph(6) | |
9 assert not is_at_free(cycle) | |
10 | |
11 path = nx.path_graph(6) | |
12 assert is_at_free(path) | |
13 | |
14 small_graph = nx.complete_graph(2) | |
15 assert is_at_free(small_graph) | |
16 | |
17 petersen = nx.petersen_graph() | |
18 assert not is_at_free(petersen) | |
19 | |
20 clique = nx.complete_graph(6) | |
21 assert is_at_free(clique) | |
22 | |
23 line_clique = nx.line_graph(clique) | |
24 assert not is_at_free(line_clique) |