Exemple #1
0
 def test_sequence_identifer_nonsense(self):
     bio = Bioinfo(test_txt_nonsense)
     self.assertFalse(bio.sequence_identifer())
Exemple #2
0
 def test_sequence_identifer_dna(self):
     bio = Bioinfo(test_fasta_dna)
     self.assertTrue(bio.sequence_identifer())
Exemple #3
0
 def test_sequence_identifer_protein(self):
     bio = Bioinfo(test_fasta_protein)
     self.assertTrue(bio.sequence_identifer())
Exemple #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)
Exemple #5
0
 def test_sequence_identifer_lower_case(self):
     with self.assertRaises(SystemExit):
         bio = Bioinfo(test_txt_lowercase)
         self.assertFalse(bio.sequence_identifer())
Exemple #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)
Exemple #7
0
 def test_Bioinfo_Input_text(self):
     self.assertTrue(Bioinfo(test_txt_dna))
Exemple #8
0
 def test_splice_string_by_position(self):
     bio = Bioinfo(test_fasta_dna)
     self.assertTrue(bio.splice_string_by_position(3), list)
Exemple #9
0
 def test_Bioinfo_Input_dict(self):
     with self.assertRaises(SystemExit) as cm:
         bio = Bioinfo(test_dict)
     self.assertEqual(cm.exception.code, 1) 
Exemple #10
0
 def test_splice_string_by_charater(self):
     bio = Bioinfo(test_fasta_dna)
     self.assertIsInstance(bio.splice_string_by_charaters("A", "T"), list)
Exemple #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)
Exemple #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)
Exemple #13
0
 def test_change_characters_tuple_as_template(self):
     bio = Bioinfo(test_fasta_dna)
     self.assertTrue(bio.change_characters(test_tuple, test_dict))
Exemple #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)
Exemple #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"))
Exemple #16
0
 def test_Bioinfo_Input_fasta(self):
     self.assertTrue(Bioinfo(test_fasta_dna))
Exemple #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)
Exemple #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))