From e04275f7d1119539514eeba63e65cc03eb0af6c5 Mon Sep 17 00:00:00 2001 From: Xavier Robin <xavier.robin@unibas.ch> Date: Fri, 20 Jan 2023 16:57:28 +0100 Subject: [PATCH] test: SCHWED-5783 speedup test --- modules/mol/alg/tests/test_ligand_scoring.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/mol/alg/tests/test_ligand_scoring.py b/modules/mol/alg/tests/test_ligand_scoring.py index a09d350fb..40672dcea 100644 --- a/modules/mol/alg/tests/test_ligand_scoring.py +++ b/modules/mol/alg/tests/test_ligand_scoring.py @@ -267,14 +267,17 @@ class TestLigandScoring(unittest.TestCase): """Test check_resname argument works """ # 4C0A has mismatching sequence and fails with check_resnames=True - trg, trg_seqres = io.LoadMMCIF(os.path.join('testfiles', "1r8q.cif.gz"), seqres=True) + mdl_1r8q, _ = io.LoadMMCIF(os.path.join('testfiles', "1r8q.cif.gz"), seqres=True) trg_4c0a, _ = io.LoadMMCIF(os.path.join('testfiles', "4c0a.cif.gz"), seqres=True) + mdl = mdl_1r8q.Select("cname=D or cname=F") + trg = trg_4c0a.Select("cname=C or cname=I") + with self.assertRaises(RuntimeError): - sc = LigandScorer(trg, trg_4c0a, None, None, check_resnames=True) + sc = LigandScorer(mdl, trg, [mdl.FindResidue("F", 1)], [trg.FindResidue("I", 1)], check_resnames=True) sc._compute_scores() - sc = LigandScorer(trg, trg_4c0a, None, None, check_resnames=False) + sc = LigandScorer(mdl, trg, [mdl.FindResidue("F", 1)], [trg.FindResidue("I", 1)], check_resnames=False) sc._compute_scores() -- GitLab