예제 #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