from solution import top_words CASES = [ (('b a b c', 1), ['b']), ] failed = 0 for args, want in CASES: got = top_words(*args) status = 'ok' if got == want else 'FAIL' failed += status == 'FAIL' print(status, 'top_words', args, '->', repr(got), '(expected', repr(want) + ')') print('passed', len(CASES) - failed, 'of', len(CASES))