Comments (4)
The reason for this is that a change was applied to the test to normalize case.
It was justified because other language tracks expect normalization - specifically ruby and clojure in the pull request. I also noticed Haskell does this normalization.
from python.
The problem is not that normalization is tested. The problem is also not that the test is not opinionated about how to normalize case.
The problem is that the test is so minimalistic that a user wrote code that passed the test suite while the solution only works if the function gets the words in the right order.
My simple solution to the mixed case test is to expand the test string "go Go GO"
to
"go Go GO Stop stop"
and assume as result a dict with the values 3, 2. That would still not force the user to only normalize to lower case.
def test_mixed_case(self):
self.assertEqual([2, 3], sorted(list(word_count('go Go GO Stop stop').values())))
from python.
I actually don't mind which direction the user normalizes to, and I think that it would be nice to leave that up to the person solving the problem. I like this suggested approach and wouldn't mind changing the other tracks to use it.
from python.
Okay, did it for the Python track.
from python.
Related Issues (20)
- Uuh HOT 1
- Code passes `binary_search_test.py`although malfunctioning HOT 1
- [Triangle] Proposed Solution HOT 2
- Exercism HOT 1
- https://github.com/thelinuxchoice/choicebot HOT 1
- Exorcism HOT 2
- [Inventory Management] Add test that `decrement_item` does not add an item with quantity of zero HOT 1
- Jarvis HOT 1
- [Enhancement] : Integrate Interactive Code Playground for Python Exercises HOT 1
- hello HOT 2
- [Generator Concept + Plane Ticket Exercise]: Consider Adding list of common generator-iterators from the Std. Library
- Building a training set of tags for python HOT 20
- [Draft] Cutting Zebra Puzzle HOT 1
- Plane Tickets yield expression link not working correctly in the ui HOT 1
- Clarify that the root is a natural number in square-root documentation HOT 2
- Instructions for python flatten: change null into None HOT 2
- Add additional test case to 'Matching Brackets' HOT 2
- Forth Exercise HOT 3
- [Little Sister’s Essay] A typo in the exercise introduction HOT 3
- [Card Games] `approx_average_is_average` docstring summary needs improvement HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python.