def testHammingDistanceFromFile(self): with open('data/hammingDistance.txt') as fp: sequence1, sequence2 = map(lambda x: x.strip(), fp.readlines()) self.assertEqual(483, hammingDistance(sequence1, sequence2))
def testHammingDistance(self): sequence1, sequence2 = 'GAGCCTACTAACGGGAT', 'CATCGTAATGACGGCCT' self.assertEqual(7, hammingDistance(sequence1, sequence2))