Test Driven Development (TDD) - is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the software is improved to pass the new tests, only.
-
Look at the file find_min.py.
-
To follow TDD the first thing we have to do is write tests for given functions. Fortunately for you I've already created tests. (look at the file tests/find_min_test.py)
-
Run tests:
python3 -m unittest tests/find_min_test.py
You will see that it ran 7 tests and all of them FAILED (failures=7)
-
Now, complete that functions in find_min.py
-
After running tests all of them should be passed.
-
Compare your answer with mine located in answers/find_min.py
-
Commit and push your changes
-
Look at the file find_max.py. You will find that there are empty functions.
-
Run tests for find_max functions:
python3 -m unittest tests/find_max_test.py
You will see that it Ran 7 tests without failures, because there is no body for test functions in test/find_max_test.py
-
You have to do:
-
Write documentation for function get_max inside find_max.py
-
Write test for get_max function inside tests/find_max.py
-
Run tests and see that one test failed (test_get_max)
-
Implement get_max function
-
Run tests, all of the tests shoud be passed.
-
Do the same for every function one by one
-
-
Commit and push your changes
-
Smile cause you've done good job.