diff --git a/modules/bindings/tests/CMakeLists.txt b/modules/bindings/tests/CMakeLists.txt index 17a60fa55ebabf6984a140c5aafecd6d4619a617..d99953fe24f509c5f9cff16d95e86c2ea3be85e3 100644 --- a/modules/bindings/tests/CMakeLists.txt +++ b/modules/bindings/tests/CMakeLists.txt @@ -9,6 +9,7 @@ set(OST_BINDINGS_UNIT_TESTS test_tmtools.py test_ialign.py test_lga.py + test_hbplus.py ) ost_unittest(MODULE bindings diff --git a/modules/bindings/tests/test_hbplus.py b/modules/bindings/tests/test_hbplus.py new file mode 100644 index 0000000000000000000000000000000000000000..87a32d2823174522525443524378395cc4cdc148 --- /dev/null +++ b/modules/bindings/tests/test_hbplus.py @@ -0,0 +1,25 @@ +import unittest +from ost import * +from ost import settings +from ost.bindings import hbplus + +class TestHBPlusBinding(unittest.TestCase): + + def setUp(self): + self.protein = io.LoadEntity("testfiles/testprotein.pdb") + + def testHBondList(self): + hbond_list = hbplus.HBondList(self.protein) + self.assertEqual(len(hbond_list), 499) + + def testHBondScore(self): + self.assertEqual(hbplus.HBondScore(self.protein, self.protein), 1.0) + +if __name__ == "__main__": + try: + settings.Locate("hbplus") + except: + print("Could not find hbplus, could not test binding...") + sys.exit(0) + from ost import testutils + testutils.RunTests()