April 2015
Intermediate to advanced
264 pages
5h 31m
English
In the previous chapter, we went through a small TDD cycle by creating a failing test and then making it pass. In this chapter, we are going to fill out the rest of the Stock class by writing more tests. In the process, we will dig deeper into the TDD cycle and the unittest module.
In the first test, we wrote a very simple test that checked whether a new Stock class has its price attribute initialized to None. We can now think about what requirement we want to implement next.
An observant reader might have caught on to the terminology used in the previous sentence, where I said that we can think about the requirement to implement next, instead of saying that we can think ...
Read now
Unlock full access