From 8ef94647b759c16df1ba78aaf814bc93de3b01cb Mon Sep 17 00:00:00 2001 From: Valerio Mariani <valerio.mariani@unibas.ch> Date: Wed, 28 Nov 2012 16:05:19 +0100 Subject: [PATCH] Refactored unittests for feasibility check --- modules/io/tests/test_io_pdb.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/io/tests/test_io_pdb.py b/modules/io/tests/test_io_pdb.py index 76537e9f7..17933f35a 100644 --- a/modules/io/tests/test_io_pdb.py +++ b/modules/io/tests/test_io_pdb.py @@ -18,12 +18,19 @@ class TestPDB(unittest.TestCase): def test_compnd_parser(self): profiles=io.IOProfiles() profiles['FEAS_CHECK']=io.IOProfile(bond_feasibility_check=True) + profiles['NO_FEAS_CHECK']=io.IOProfile(bond_feasibility_check=False) - e=io.LoadPDB('testfiles/pdb/simple_defective.pdb', restrict_chains="A",profile='FEAS_CHECK') + e1=io.LoadPDB('testfiles/pdb/simple_defective.pdb', restrict_chains="A",profile='FEAS_CHECK') + e2=io.LoadPDB('testfiles/pdb/simple_defective.pdb', restrict_chains="A",profile='NO_FEAS_CHECK') + ed=io.LoadPDB('testfiles/pdb/simple_defective.pdb', restrict_chains="A") - res=e.FindResidue('A',3) - - self.assertFalse(mol.BondExists(res.FindAtom("CA"),res.FindAtom("CB"))) + res1=e1.FindResidue('A',3) + res2=e2.FindResidue('A',3) + resd=ed.FindResidue('A',3) + + self.assertFalse(mol.BondExists(res1.FindAtom("CA"),res1.FindAtom("CB"))) + self.assertTrue(mol.BondExists(res2.FindAtom("CA"),res2.FindAtom("CB"))) + self.assertTrue(mol.BondExists(resd.FindAtom("CA"),resd.FindAtom("CB"))) if __name__== '__main__': from ost import testutils -- GitLab