Exemplo n.º 1
0
 def test_sequence_identifer_nonsense(self):
     bio = Bioinfo(test_txt_nonsense)
     self.assertFalse(bio.sequence_identifer())
Exemplo n.º 2
0
 def test_sequence_identifer_dna(self):
     bio = Bioinfo(test_fasta_dna)
     self.assertTrue(bio.sequence_identifer())
Exemplo n.º 3
0
 def test_sequence_identifer_protein(self):
     bio = Bioinfo(test_fasta_protein)
     self.assertTrue(bio.sequence_identifer())
Exemplo n.º 4
0
 def test_sequence_identifer_empty(self):
     with self.assertRaises(SystemExit) as cm:
         bio = Bioinfo(test_fasta_empty)
         bio.sequence_identifer()
     self.assertEqual(cm.exception.code, 1)
Exemplo n.º 5
0
 def test_sequence_identifer_lower_case(self):
     with self.assertRaises(SystemExit):
         bio = Bioinfo(test_txt_lowercase)
         self.assertFalse(bio.sequence_identifer())
Exemplo n.º 6
0
 def test_change_characters_list_as_translate_dict(self):
         with self.assertRaises(SystemExit) as cm:
             bio = Bioinfo(test_fasta_dna)
             bio.change_characters(test_string, test_list)
         self.assertEqual(cm.exception.code, 1)
Exemplo n.º 7
0
 def test_Bioinfo_Input_text(self):
     self.assertTrue(Bioinfo(test_txt_dna))
Exemplo n.º 8
0
 def test_splice_string_by_position(self):
     bio = Bioinfo(test_fasta_dna)
     self.assertTrue(bio.splice_string_by_position(3), list)
Exemplo n.º 9
0
 def test_Bioinfo_Input_dict(self):
     with self.assertRaises(SystemExit) as cm:
         bio = Bioinfo(test_dict)
     self.assertEqual(cm.exception.code, 1) 
Exemplo n.º 10
0
 def test_splice_string_by_charater(self):
     bio = Bioinfo(test_fasta_dna)
     self.assertIsInstance(bio.splice_string_by_charaters("A", "T"), list)
Exemplo n.º 11
0
 def test_splice_string_by_position_step_to_big(self):
     with self.assertRaises(SystemExit) as cm:
         bio = Bioinfo(test_fasta_empty)
         bio.splice_string_by_position(0,2)
     self.assertEqual(cm.exception.code, 1)
Exemplo n.º 12
0
 def test_splice_string_by_charater_invalid_charater2(self):
     with self.assertRaises(SystemExit) as cm:
         bio = Bioinfo(test_fasta_empty)
         bio.splice_string_by_charaters("", "A")
     self.assertEqual(cm.exception.code, 1)
Exemplo n.º 13
0
 def test_change_characters_tuple_as_template(self):
     bio = Bioinfo(test_fasta_dna)
     self.assertTrue(bio.change_characters(test_tuple, test_dict))
Exemplo n.º 14
0
 def test_change_characters_dict_as_template(self):
     with self.assertRaises(SystemExit) as cm:
         bio = Bioinfo(test_fasta_dna)
         bio.change_characters(test_dict, test_dict)
     self.assertEqual(cm.exception.code, 1)
Exemplo n.º 15
0
 def test_count_characters_search_for_Strings(self):
     bio = Bioinfo(test_fasta_dna)
     self.assertTrue(bio.count_characters("A", "T", "G", "C", "AAA"))
Exemplo n.º 16
0
 def test_Bioinfo_Input_fasta(self):
     self.assertTrue(Bioinfo(test_fasta_dna))
Exemplo n.º 17
0
 def test_count_characters_search_for_not_Strings(self):
     with self.assertRaises(TypeError) as cm:
         bio = Bioinfo(test_fasta_dna)
         bio.count_characters(1,2,3,4)
     self.assertEqual(type(cm.exception), TypeError)
Exemplo n.º 18
0
 def test_change_characters_dict_as_translate_dict(self):
     bio = Bioinfo(test_fasta_dna)
     self.assertTrue(bio.change_characters(test_string, test_dict))