def test_correctly_handles_partially_invalid_input(self): with self.assertRaisesWithMessage(ValueError): to_rna('ACGTXXXCTTAA')
def test_transcribes_cytosine_to_guanine(self): self.assertEqual(to_rna('C'), 'G')
def test_correctly_handles_completely_invalid_input(self): with self.assertRaisesWithMessage(ValueError): to_rna('XXX')
def test_correctly_handles_single_invalid_input(self): with self.assertRaisesWithMessage(ValueError): to_rna('U')
def test_transcribes_all_occurences(self): self.assertEqual(to_rna('ACGTGGTCTTAA'), 'UGCACCAGAAUU')
def test_transcribes_adenine_to_uracil(self): self.assertEqual(to_rna('A'), 'U')
def test_transcribes_thymine_to_adenine(self): self.assertEqual(to_rna('T'), 'A')