123456789101112131415161718192021222324252627282930313233 |
- from twttr import shorten
- def main():
- test_uppercase()
- test_lowercase()
- test_null()
- test_digits()
- test_punctuation()
- def test_uppercase():
- assert shorten('TWITTER') == 'TWTTR'
- def test_lowercase():
- assert shorten('twitter') == 'twttr'
- def test_null():
- assert shorten('') == ''
- def test_digits():
- assert shorten('abc123') == 'bc123'
- def test_punctuation():
- assert shorten('abc,') == 'bc,'
- if __name__ == "__main__":
- main()
|