Skip to main content
10 events
when toggle format what by license comment
Feb 8, 2023 at 22:44 vote accept Tuhin
Feb 7, 2023 at 22:34 history edited kcw78
added python tag
Feb 6, 2023 at 15:35 answer added kcw78 timeline score: 1
Feb 6, 2023 at 14:26 comment added Tuhin I've updated the question and added contents from the test_twttr.py and twttr.py. unfortunately it's not showing all the contents from my twttr.py file.
Feb 6, 2023 at 14:24 history edited Tuhin CC BY-SA 4.0
added code from the main file and unit test file
Feb 6, 2023 at 14:21 history edited Tuhin CC BY-SA 4.0
added 550 characters in body
Feb 6, 2023 at 14:16 comment added Tuhin Thanks @kcw78. I have this in my test_twttr.py. it passes all when I run pytest test_twttr.py: from twttr import shorten def test_replaces_vowels(): assert shorten('Twitter') == 'Twttr' def test_replaces_vowels_in_capital(): assert shorten("WHAT's your name?") == "WHT's yr nm?" def test_replaces_vowels_in_lowercase(): assert shorten('able') == 'bl' def test_omits_uppercase(): assert shorten('CS50') == 'CS50' def test_omits_numbers(): assert shorten(123) == '123' def test_omits_punctuations(): assert shorten('a,d!') == ',d!'
Feb 6, 2023 at 13:50 comment added kcw78 Are you referring to this test: correct twttr.py passes all test_twttr checks? If, so this test is running your test_twttr.py against their twttr.py that is known to be correct. When it does, something goes wrong in your test_twttr.py. It's hard to give more help without seeing your test_twttr.py code. It should only be asserting a few test statements.
S Feb 6, 2023 at 11:23 review First questions
Feb 8, 2023 at 22:46
S Feb 6, 2023 at 11:23 history asked Tuhin CC BY-SA 4.0