def test_save_load(self): filename = "test_save_load.tmp" s = BioSeq("ATATACAGATGAT", "DNA") s.save(filename) s2 = BioSeq("", "RNA") s2.load(filename) self.assertEqual(s.seq_type, s2.seq_type) self.assertEqual(s.sequence, s2.sequence) os.remove(filename)
def test_save_load(self): seq = BioSeq.create_bio_seq("ACTGTCATAT") seq.save('tests/files/test_save_load.csv') loaded_seq = BioSeq.load('tests/files/test_save_load.csv') self.assertEqual(seq.get_seq(), loaded_seq.get_seq()) self.assertEqual(seq.get_genetic_code(), loaded_seq.get_genetic_code()) self.assertEqual(seq.__class__.__name__, loaded_seq.__class__.__name__)