-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
word-count: Add multiple apostrophes test case #2169
Conversation
Slight divergence, but what the heck should happen with a plural possessive? For instance, what should the word count be for the phrase "lawyers accept both lawyer's fees and lawyers' fees?"? |
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.
I'm okay with this test as is, though we are getting to the point where only a regex-based solution will work.
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.
Please check out the docs on adding track specific tests and regenerating the test suite. CI will not pass if word_count_test.py is edited directly.
Sounds good, I'll get on that later today. I appreciate the help from everyone |
Really sorry for possibly blowing up everyone's feed. After generating tests from the automated script, I'm still getting failures from Travis. Do I need to revert the test script back to the original passing version then push without the test added? Thanks and sorry again for the mess. |
So I double checked and the reason I was pushing two versions of the test was due to my local version of problem-specs contained the test from my discussion with the main repo. I updated that but I'm still having the same failures from Travis. |
Did you actually set the branch in your local copy of problem-specifications to |
I'll take a look Monday. That could be the issue. |
Good call @yawpitch |
This is a localized version of a change I discussed with the main problem-specs repo. They told me that, due to their lockdown, I should bring this to the language-specific repositories.
Effectively, the problem states that contractions ("can't", "won't", etc.) should treat apostrophes as part of the word, but rule 3 states:
Other than the apostrophe in a contraction all forms of punctuation are ignored
As such, I've added a very simple case testing that normal apostrophes are removed. The following code (while bad) should do a good job of showcasing a solution that passes all the live tests but fails the new one:
Thanks!