Esempio n. 1
0
 def test_sequence_identifer_nonsense(self):
     bio = Bioinfo(test_txt_nonsense)
     self.assertFalse(bio.sequence_identifer())
Esempio n. 2
0
 def test_sequence_identifer_dna(self):
     bio = Bioinfo(test_fasta_dna)
     self.assertTrue(bio.sequence_identifer())
Esempio n. 3
0
 def test_sequence_identifer_protein(self):
     bio = Bioinfo(test_fasta_protein)
     self.assertTrue(bio.sequence_identifer())
Esempio 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)
Esempio n. 5
0
 def test_sequence_identifer_lower_case(self):
     with self.assertRaises(SystemExit):
         bio = Bioinfo(test_txt_lowercase)
         self.assertFalse(bio.sequence_identifer())
Esempio 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)
Esempio n. 7
0
 def test_Bioinfo_Input_text(self):
     self.assertTrue(Bioinfo(test_txt_dna))
Esempio n. 8
0
 def test_splice_string_by_position(self):
     bio = Bioinfo(test_fasta_dna)
     self.assertTrue(bio.splice_string_by_position(3), list)
Esempio 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) 
Esempio 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)
Esempio 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)
Esempio 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)
Esempio 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))
Esempio 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)
Esempio 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"))
Esempio n. 16
0
 def test_Bioinfo_Input_fasta(self):
     self.assertTrue(Bioinfo(test_fasta_dna))
Esempio 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)
Esempio 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))