Inspired by PacktPub's Test Driven Python Development
To have an idea of what is going on, from the root directory:
python testing/tests_TimeSeries.py
- Write tests! (:
Main Pattern:
-> Red: Arrange-Act-Assert
| Green
| Refactor ->-
| |
------<-------
Refactoring:
- Rename variables and methods
- Make comments redundant by naming constants or using Enum
- Extract method refactoring
- Replace calculations with local variables
- Extract conditionals to methods
- Extract class
- Move method to class
Some vocabulary:
1. 'Test doubles':
- mocks
- stubs
- fakes
- spies
2. 'Patching'
- complete the Event() and Action() classes