class TestPairwise(unittest.TestCase): def setUp(self): self.pair = Pairwise('waldemar', 'vladimir') def test_align(self): self.pair.align() assert ''.join(self.pair.alignments[0][0]) == 'wal-demar' assert ''.join(self.pair.alignments[0][1]) == 'v-ladimir'
class TestPairwise(object): def setup(self): self.pair = Pairwise('waldemar', 'vladimir') def test_align(self): self.pair.align() assert ''.join(self.pair.alignments[0][0]) == 'wal-demar' assert ''.join(self.pair.alignments[0][1]) == 'v-ladimir'
class TestPairwise(unittest.TestCase): def setUp(self): self.pair = Pairwise('waldemar', 'vladimir') def test_basics(self): assert 'waldemar' in str(self.pair) assert 'waldemar' in repr(self.pair) assert len(self.pair) == 1 self.pair.align() assert '-' in str(self.pair) for d in 'wcta': assert len(self.pair[0, d][0]) >= len('waldemar') def test_align(self): for mode in ['global', 'local', 'overlap', 'dialign']: self.pair.align(mode=mode, distance=True, pprint=True) assert '-' in ''.join(self.pair.alignments[0][1])
def setUp(self): self.pair = Pairwise('waldemar', 'vladimir')
def pair(): return Pairwise('waldemar', 'vladimir')