Skip to content

Commit 7b6e0bd

Browse files
author
Oliver Scott
committed
Add more utils tests (bipartite).
1 parent 42da3f2 commit 7b6e0bd

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

tests/utils/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
"""
22
scaffoldgraph tests.utils
33
"""
4+
5+
from .. import mock_sdf, mock_sdf_2

tests/utils/test_aggregate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import scaffoldgraph as sg
66

77
from scaffoldgraph.utils import aggregate
8-
from .. import mock_sdf, mock_sdf_2
8+
from . import mock_sdf, mock_sdf_2
99

1010

1111
def test_aggregate(sdf_file, sdf_file_2):

tests/utils/test_bipartite.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
scaffoldgraph tests.utils.test_bipartite
3+
"""
4+
5+
import scaffoldgraph as sg
6+
import networkx as nx
7+
8+
from scaffoldgraph.utils.bipartite import make_bipartite_graph
9+
from . import mock_sdf
10+
11+
12+
def test_bipartite(sdf_file):
13+
network = sg.ScaffoldNetwork.from_sdf(sdf_file)
14+
biparite = make_bipartite_graph(network)
15+
assert nx.is_bipartite(biparite)

0 commit comments

Comments
 (0)