File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ """
2+ scaffoldgraph tests.utils.test_misc
3+ """
4+
5+ import scaffoldgraph as sg
6+
7+ from scaffoldgraph .utils import summary
8+ from . import mock_sdf
9+
10+
11+ SUMMARY_GRAPH = """Type: ScaffoldNetwork
12+ Number of molecule nodes: 2
13+ Number of scaffold nodes: 8
14+ Number of edges: 12
15+ Max hierarchy: 3
16+ Min hierarchy: 1
17+ """
18+
19+
20+ SUMMARY_NODE = """Node c1ccccc1 has the following properties:
21+ Type: scaffold
22+ Hierarchy: 1
23+ Degree: 2
24+ Parent scaffolds:
25+ Child scaffolds: O=C1CN=C(c2ccccc2)C=CN1 O=C1CN=Cc2ccccc2N1 O=C1CN=C(c2ccccc2)c2ccccc2N1 O=C1CN=C(c2ccccc2)c2ccsc2N1
26+ Child molecules:
27+ """
28+
29+
30+ def test_bipartite (sdf_file ):
31+ network = sg .ScaffoldNetwork .from_sdf (sdf_file )
32+ assert summary (network ).strip () == SUMMARY_GRAPH .strip ()
33+ assert summary (network , 'c1ccccc1' ).strip () == SUMMARY_NODE .strip ()
You can’t perform that action at this time.
0 commit comments