Example #1
0
    def test_alignment_block_same_length_as_matches(self):
        record = PafRecord(mlen=5, blen=5)

        actual = record.blast_identity()
        expected = 1.0

        assert actual == expected
Example #2
0
    def test_no_matches_returns_zero(self):
        record = PafRecord(mlen=0, blen=5)

        actual = record.blast_identity()
        expected = 0.0

        assert actual == expected
Example #3
0
    def test_alignment_block_longer_than_matches(self):
        record = PafRecord(mlen=4, blen=5)

        actual = record.blast_identity()
        expected = 0.8

        assert actual == expected
Example #4
0
    def test_unmapped_record_returns_zero(self):
        record = PafRecord()

        actual = record.blast_identity()
        expected = 0.0

        assert actual == expected