File: test_tree_decomposition.py

package info (click to toggle)
pytorch-geometric 2.6.1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,904 kB
  • sloc: python: 127,155; sh: 338; cpp: 27; makefile: 18; javascript: 16
file content (15 lines) | stat: -rw-r--r-- 393 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import pytest

from torch_geometric.testing import withPackage
from torch_geometric.utils import tree_decomposition


@withPackage('rdkit')
@pytest.mark.parametrize('smiles', [
    r'F/C=C/F',
    r'C/C(=C\C(=O)c1ccc(C)o1)Nc1ccc2c(c1)OCO2',
])
def test_tree_decomposition(smiles):
    from rdkit import Chem
    mol = Chem.MolFromSmiles(smiles)
    tree_decomposition(mol)  # TODO Test output