Beispiel #1
0
 def test_basic(self):
     s = "Barcode1,ACGTGA,ACGT"
     i = _line_iterator(s)
     actual = split.load_barcodes(i)
     self.assertEqual(1, len(actual))
     self.assertEqual(1, len(actual['ACGTGA']))
     self.assertEqual('Barcode1', actual['ACGTGA'][0][1])
Beispiel #2
0
    def test_extra_data(self):
        """
        Extra items in a row should be ignored
        """
        s = """Barcode1,ACGTGA,ACGT,Data from patient X
Barcode2,ACTGAA,ACGT,Data from patient Y"""
        i = _line_iterator(s)
        actual = split.load_barcodes(i)
        self.assertEqual(2, len(actual))
        self.assertEqual('Barcode1', actual['ACGTGA'][0][1])