Family Grocery Kata
A very simple python kata, for clean code basic exercise.
Requirements
Queue kata simulate a queue at the Family grocery store.
- First-in-first-out (FIFO) queue
- Senior citizen got prioritized in the queue, senior age starts from 62 years old
- Among senior citizens, FIFO applies
- Some items can't be bought by customer under 18 and senior citizens:
cigarette
,alcohol
. Any findings will be excluded from the queue
How to
Refactor the initial code so that the code reflects clean code principles.
- Readable, easy to understand
- Extensible, easy to add new feature
The exercise steps:
- Create your own branch using pattern
kata/<github username>
- Refactor the code
- Run
pytest
to ensure your code is running correctly - Create a Pull Review and request
Bonus:
- Spot and fix inefficient code
- Cover edge cases
- Make testing more readable and cover more cases