Example #1
0
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'
Example #2
0
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'
Example #3
0
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])
Example #4
0
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])
Example #5
0
 def setUp(self):
     self.pair = Pairwise('waldemar', 'vladimir')
Example #6
0
def pair():
    return Pairwise('waldemar', 'vladimir')
Example #7
0
 def setUp(self):
     self.pair = Pairwise('waldemar', 'vladimir')