Ejemplo n.º 1
0
 def test_one_empty_strings(self):
     with self.assertRaises(ValueError):
         diff_count('AG', 'GAGCC')
Ejemplo n.º 2
0
 def test_empty_strings(self):
     self.assertEqual(diff_count('', ''), 0)
Ejemplo n.º 3
0
 def test_different_length_strings(self):
     with self.assertRaises(ValueError):
         diff_count('AG', 'GAGCC')
Ejemplo n.º 4
0
 def test_single_different_strings(self):
     self.assertEqual(diff_count('A', 'G'), 1)
Ejemplo n.º 5
0
 def test_single_identical_strings(self):
     self.assertEqual(diff_count('A', 'A'), 0)
Ejemplo n.º 6
0
 def test_different_long_strings(self):
     self.assertEqual(diff_count('GAGCCTACTAACGGGAT', 'CATCGTAATGACGGCCT'),
                      7)
Ejemplo n.º 7
0
 def test_identical_strings(self):
     self.assertEqual(diff_count('GAGCCTACTAACGGGAT', 'GAGCCTACTAACGGGAT'),
                      0)
Ejemplo n.º 8
0
from hello_world import hello
from string_compare import diff_count

print(hello())
print(diff_count('GAGCCTACTAACGGGAT', 'CATCGTAATGACGGCCT'))