Baby steps¶
Here we have description. bla bla bla.
ToDo: Implementing simple class Number.
Learn: Running the tests and find out the approach we are going to use.
Working directory: **baby_steps**
Find minimum.¶
Look at the file find_min.py.
To follow TDD the first thing you have to do is to write tests for the given functions. Fortunately for you I’ve already created tests. (tests/test_find_min.py)
Run tests:
python3 -m unittest tests/test_find_min.py # Runs 7 tests and all of them are FAILED (failures=7)
Now, complete the first failed function in find_min.py.
Run the tests (step 3) and make sure you have +1 passed test.
Repeat the steps 4 and 5 until all of them are passed.
Compare your answer with mine located in answers/find_min.py
You can commit your changes
Find maximum.¶
Look at the file find_max.py.
To follow TDD the first thing you have to do is to write tests for the given functions. Fortunately for you I’ve already created tests. (tests/test_find_max.py)
Run tests:
python3 -m unittest tests/test_find_max.py # Runs 7 tests and all of them are FAILED (failures=7)
Now, complete the first failed function in find_max.py.
Run the tests (step 3) and make sure you have +1 passed test.
Repeat the steps 4 and 5 until all of them are passed.
Compare your answer with mine located in answers/find_max.py
You can commit your changes and smile! You’ve done good job.