def test_kmc_file_next_kmer(create_kmc_db):
    ' Test if all counted k-mers are returned by KMC API using NextKmer method. '
    pattern = create_kmc_db['kmers']
    kmc_file = _open_for_listing()
    counter = pka.Count()
    kmer = pka.KmerAPI(create_kmc_db['kmer_len'])
    res = {}
    while kmc_file.ReadNextKmer(kmer, counter):
        res[str(kmer)] = counter.value
    assert (res == pattern)
Test if all counted k-mers are returned by KMC API using NextKmer method.
def test_kmc_file_next_kmer(create_kmc_db):
    '  '
    pattern = create_kmc_db['kmers']
    kmc_file = _open_for_listing()
    counter = pka.Count()
    kmer = pka.KmerAPI(create_kmc_db['kmer_len'])
    res = {}
    while kmc_file.ReadNextKmer(kmer, counter):
        res[str(kmer)] = counter.value
    assert (res == pattern)