Ejemplo n.º 1
0
 def test_with_BW(self):
     fragments = mdcfragments.get_fragments(self.geom.top)
     input_values = (val for val in [""])
     option = test_filenames.adrb2_human_xlsx
     with mock.patch('builtins.input', lambda *x: next(input_values)):
         residx2conlab, lblr = cli._parse_consensus_option(option, "BW",
                                                           self.geom.top,
                                                           fragments,
                                                           return_Labeler=True,
                                                           try_web_lookup=False)
         self.assertIsInstance(lblr, LabelerBW)
         self.assertIsInstance(residx2conlab,list)
Ejemplo n.º 2
0
    def test_with_BW_already_instantiated(self):
        fragments = mdcfragments.get_fragments(self.geom.top)
        BW = LabelerBW(test_filenames.adrb2_human_xlsx)
        input_values = (val for val in [""])
        with mock.patch('builtins.input', lambda *x: next(input_values)):

            residx2conlab, lblr = cli._parse_consensus_option(BW, "BW",
                                                              self.geom.top,
                                                              fragments,
                                                              return_Labeler=True)
            self.assertIsInstance(lblr, LabelerBW)
            self.assertEqual(lblr,BW)
            self.assertIsInstance(residx2conlab,list)
Ejemplo n.º 3
0
 def test_no_answer(self):
     BW = LabelerBW(test_filenames.adrb2_human_xlsx)
     residx2conlab, lblr = cli._parse_consensus_option(BW, "BW",
                                                       self.geom.top,
                                                       [_np.arange(10)],
                                                       return_Labeler=True)
Ejemplo n.º 4
0
 def test_empty_w_return(self):
     residx2conlab, lblr  = cli._parse_consensus_option(None, None, self.geom.top,
                                                        None,
                                                        return_Labeler=True)
     assert lblr is None
     assert _pandasunique(residx2conlab)[0] is None
Ejemplo n.º 5
0
 def test_empty(self):
     residx2conlab= cli._parse_consensus_option(None, None, self.geom.top,
                                                None,
                                                )
     assert _pandasunique(residx2conlab)[0] is None