def test_check_kmer(create_kmc_db):
    '\n    Test case for CheckKmer method.\n\n    Check if are k-mers from input are present in the database and\n    if some not present in the input are absent in the output.\n    '
    kmers = create_kmc_db['kmers']
    kmer_len = create_kmc_db['kmer_len']
    kmer = pka.KmerAPI(kmer_len)
    counter = pka.Count()
    kmc_file = _open_for_ra()
    for (kmer_str, count) in kmers.items():
        kmer.from_string(kmer_str)
        assert kmc_file.CheckKmer(kmer, counter)
        assert (counter.value == count)
    absent_kmers = create_kmc_db['absent_kmers']
    for kmer_str in absent_kmers:
        kmer.from_string(kmer_str)
        assert (not kmc_file.CheckKmer(kmer, counter))
Test case for CheckKmer method.

Check if are k-mers from input are present in the database and
if some not present in the input are absent in the output.
def test_check_kmer(create_kmc_db):
    '\n    Test case for CheckKmer method.\n\n    Check if are k-mers from input are present in the database and\n    if some not present in the input are absent in the output.\n    '
    kmers = create_kmc_db['kmers']
    kmer_len = create_kmc_db['kmer_len']
    kmer = pka.KmerAPI(kmer_len)
    counter = pka.Count()
    kmc_file = _open_for_ra()
    for (kmer_str, count) in kmers.items():
        kmer.from_string(kmer_str)
        assert kmc_file.CheckKmer(kmer, counter)
        assert (counter.value == count)
    absent_kmers = create_kmc_db['absent_kmers']
    for kmer_str in absent_kmers:
        kmer.from_string(kmer_str)
        assert (not kmc_file.CheckKmer(kmer, counter))