Пример #1
0
def test_hamming_distance_eight():
    """
    Test :py:func:`riboviz.barcodes_umis.hamming_distance` with
    strings distance 8 apart.
    """
    assert barcodes_umis.hamming_distance("GATTACCA", "CTAATGGT") == 8
Пример #2
0
def test_hamming_distance_one():
    """
    Test :py:func:`riboviz.barcodes_umis.hamming_distance` with
    strings distance 1 apart.
    """
    assert barcodes_umis.hamming_distance("GATTACCA", "GATTGCCA") == 1
Пример #3
0
def test_hamming_distance_nonequal_characters():
    """
    Test :py:func:`riboviz.barcodes_umis.hamming_distance` with
    non-equal characters.
    """
    assert barcodes_umis.hamming_distance("A", "T") == 1
Пример #4
0
def test_hamming_distance_equal_strings():
    """
    Test :py:func:`riboviz.barcodes_umis.hamming_distance` with equal
    strings.
    """
    assert barcodes_umis.hamming_distance("GATTACCA", "GATTACCA") == 0
Пример #5
0
def test_hamming_distance_empty():
    """
    Test :py:func:`riboviz.barcodes_umis.hamming_distance` with empty
    strings.
    """
    assert barcodes_umis.hamming_distance("", "") == 0