Esempio n. 1
0
    def test_write_read(self):
        read = READ_HEADER.copy()
        read.update(READ_DATA)
        write_read(self.output_file, read)

        file_pos = self.output_file.tell()
        self.assertTrue(file_pos % 8 == 0)

        self.output_file.seek(0)
        num_flows = len(read['flowgram_values'])
        observed = parse_read(self.output_file)
        self.assertEqual(observed, read)

        file_pos = self.output_file.tell()
        self.assertTrue(file_pos % 8 == 0)
Esempio n. 2
0
    def test_write_read(self):
        read = READ_HEADER.copy()
        read.update(READ_DATA)
        write_read(self.output_file, read)

        file_pos = self.output_file.tell()
        self.assertTrue(file_pos % 8 == 0)

        self.output_file.seek(0)
        num_flows = len(read['flowgram_values'])
        observed = parse_read(self.output_file)
        self.assertEqual(observed, read)

        file_pos = self.output_file.tell()
        self.assertTrue(file_pos % 8 == 0)
Esempio n. 3
0
 def test_parse_read(self):
     self.sff_file.seek(440)
     observed = parse_read(self.sff_file, 400)
     expected = dict(READ_HEADER.items() + READ_DATA.items())
     self.assertEqual(observed, expected)
Esempio n. 4
0
 def test_parse_read(self):
     self.sff_file.seek(440)
     observed = parse_read(self.sff_file, 400)
     expected = dict(READ_HEADER.items() + READ_DATA.items())
     self.assertEqual(observed, expected)