File: UnitTestDocTestsChem.py

package info (click to toggle)
rdkit 202009.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 129,624 kB
  • sloc: cpp: 288,030; python: 75,571; java: 6,999; ansic: 5,481; sql: 1,968; yacc: 1,842; lex: 1,254; makefile: 572; javascript: 461; xml: 229; fortran: 183; sh: 134; cs: 93
file content (31 lines) | stat: -rwxr-xr-x 1,618 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

import unittest
import doctest
from rdkit import Chem
from rdkit.Chem import FragmentMatcher, MACCSkeys, Descriptors, TemplateAlign
from rdkit.Chem import Recap, BRICS, AllChem, PropertyMol, SaltRemover, EnumerateHeterocycles, EnumerateStereoisomers
from rdkit.Chem import rdDepictor


def load_tests(loader, tests, ignore):  # pylint: disable=unused-argument
    """ Add the Doctests from the module """
    tests.addTests(doctest.DocTestSuite(EnumerateStereoisomers, optionflags=doctest.ELLIPSIS))
    tests.addTests(doctest.DocTestSuite(EnumerateHeterocycles, optionflags=doctest.ELLIPSIS))
    tests.addTests(doctest.DocTestSuite(FragmentMatcher, optionflags=doctest.ELLIPSIS))
    tests.addTests(doctest.DocTestSuite(MACCSkeys, optionflags=doctest.ELLIPSIS))
    tests.addTests(doctest.DocTestSuite(Descriptors, optionflags=doctest.ELLIPSIS))
    tests.addTests(doctest.DocTestSuite(Recap, optionflags=doctest.ELLIPSIS))
    tests.addTests(doctest.DocTestSuite(BRICS, optionflags=doctest.ELLIPSIS))
    tests.addTests(doctest.DocTestSuite(AllChem, optionflags=doctest.ELLIPSIS))
    tests.addTests(doctest.DocTestSuite(PropertyMol, optionflags=doctest.ELLIPSIS))
    tests.addTests(doctest.DocTestSuite(SaltRemover, optionflags=doctest.ELLIPSIS))
    tests.addTests(doctest.DocTestSuite(Chem, optionflags=doctest.ELLIPSIS))
    # Tests which have a dependency on using the RDKit coordinate generator
    rdDepictor.SetPreferCoordGen(False)
    tests.addTests(doctest.DocTestSuite(TemplateAlign, optionflags=doctest.ELLIPSIS))

    return tests


if __name__ == '__main__':  # pragma: nocover
    unittest.main()