コード例 #1
0
 def test_thioesterase(self, mocked_get, mocked_match):
     mocked_match.return_value = True
     for char in string.ascii_uppercase:
         mocked_get.return_value = [DummyAlignment(char, {81: char})]
         pairings = analysis.asp_thioesterase(self.record)
         assert pairings == [(char, "active site serine present: %s" % (char == "S"))]
     # and an inconclusive
     mocked_match.return_value = False
     # values here don't matter
     mocked_get.return_value = [DummyAlignment("incon", {})]
     pairings = analysis.asp_thioesterase(self.record)
     assert pairings == [("incon", "active site serine inconclusive")]
コード例 #2
0
 def test_thioesterase(self):
     with umock.patch.object(active_site_finder.common.ActiveSiteAnalysis, "scaffold_matches") as mocked_match:
         mocked_match.return_value = True
         for char in string.ascii_uppercase:
             mock("active_site_finder.common.ActiveSiteAnalysis.get_alignments",
                  returns=[DummyAlignment(char, {81: char})])
             pairings = analysis.asp_thioesterase(self.record)
             assert pairings == [(char, "active site serine present: %s" % (char == "S"))]
         # and an inconclusive
         mocked_match.return_value = False
         # values here don't matter
         mock("active_site_finder.common.ActiveSiteAnalysis.get_alignments",
              returns=[DummyAlignment("incon", {})])
         pairings = analysis.asp_thioesterase(self.record)
         assert pairings == [("incon", "active site serine inconclusive")]
コード例 #3
0
ファイル: test_analysis.py プロジェクト: stogqy/antismash
 def test_thioesterase(self):
     with patch.object(subprocessing,
                       "run_hmmpfam2",
                       return_value=parse_hmmpfam_results("TE.output")):
         results = analysis.asp_thioesterase(self.record)
     expected = {'Thioesterase0': 'active site serine present: True'}
     assert {dom.domain_id: message for dom, message in results} == expected
コード例 #4
0
 def test_thioesterase(self):
     mock("subprocessing.run_hmmpfam2", returns=parse_hmmpfam_results("TE.output"))
     results = analysis.asp_thioesterase(self.record)
     expected = {'Thioesterase0': 'active site serine present: True'}
     assert {dom.domain_id: message for dom, message in results} == expected