-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typo #46
Typo #46
Conversation
Codecov Report
@@ Coverage Diff @@
## master #46 +/- ##
==========================================
- Coverage 91.32% 91.12% -0.21%
==========================================
Files 6 5 -1
Lines 173 124 -49
==========================================
- Hits 158 113 -45
+ Misses 15 11 -4
Continue to review full report at Codecov.
|
word[i] = random.choice(keys_in_proximity[c]) | ||
if cap: | ||
# convert to upper if in upper | ||
word[i] = word[i].upper() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add test case to cover this also.
That should resolve the coverage failure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test case is already there, does code coverage count the number of test cases for logic ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A simpler resolve would be to extend the dictionary to capital letters.
Pros - Defining non alphabetical typos as well, the current implementation and this PR to assume that typos consider letters only, however, I can also put a number in between. So we can define different typos for capital letters
Cons - Will clutter the code.
Should I save this dictionary as a son rather ? This way in future if we wish to add any changes we don't have to mess with the code
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This Pull request will be completed in #52 |
Typo Try Except Removed, excess code removed, random.sample() in place of random.randint
Note : The coverage error is still there from issue #28