def test_lexicographic_permutations_3():
    '''With 5 digits, we expect the 16th permutation to be 03241'''

    assert lexicographic_permutations(4, 16) == '03241'
def test_lexicographic_permutations_1():
    '''With 3 digits, we expect the 3rd permutation to be 102'''

    assert lexicographic_permutations(2, 3) == '102'
def test_lexicographic_permutations_2():
    '''With 3 digits, we expect the 6th permutation to be 210'''

    assert lexicographic_permutations(2, 6) == '210'
def test_number_exceeds_permutations_error():
    '''With two digits, there are only 2 permutations; expect error'''

    lexicographic_permutations(1, 3)