def test_process_row_with_invalid_GSM_name(self): with LogCapture() as L: self.assertIsNone(utils.process(self.k5, self.row5)) s = str(L) self.assertIn('rsempipeline.preprocess.utils', s) self.assertIn('WARNING', s) self.assertIn('row 5: Not all GSMs are of valid names', s)
def test_process_row_with_duplicated_GSMs(self): with LogCapture() as L: self.assertIsNone(utils.process(self.k6, self.row6)) L.check(( 'rsempipeline.preprocess.utils', 'WARNING', 'Duplicated GSMs found in GSE0. of 2 GSMs, only 1 are unique'))
def test_process_row_with_invalid_GSE_name(self): with LogCapture() as L: self.assertIsNone(utils.process(self.k4, self.row4)) L.check(('rsempipeline.preprocess.utils', 'WARNING', 'row 4: invalid GSE name: invalid_GSE_name'))
def test_process_row_with_3_columns(self): with LogCapture() as L: self.assertIsNone(utils.process(self.k3, self.row3)) L.check(('rsempipeline.preprocess.utils', 'WARNING', 'row 3 is not of len 2'))
def test_process_row_with_2_columns(self): self.assertEqual(('GSE0', ['GSM1', 'GSM2']), utils.process(self.k2, self.row2))
def test_process_row_with_duplicated_GSMs(self): with LogCapture() as L: self.assertIsNone(utils.process(self.k6, self.row6)) L.check(('rsempipeline.preprocess.utils', 'WARNING', 'Duplicated GSMs found in GSE0. of 2 GSMs, only 1 are unique'))