File size: 357 Bytes
b5d1dbc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | from solution import slugify
CASES = [
(('Hello World',), 'hello-world'),
]
failed = 0
for args, want in CASES:
got = slugify(*args)
status = 'ok' if got == want else 'FAIL'
failed += status == 'FAIL'
print(status, 'slugify', args, '->', repr(got), '(expected', repr(want) + ')')
print('passed', len(CASES) - failed, 'of', len(CASES))
|