Repository navigation
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?"? |
cmccandless
left a comment
There was a problem hiding this comment.
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!