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