Chapter 1
Testing
Section 8
Testing Things That Involve Randomness
Many times we create random values or put values into random order. In many statistical tests, repeated random shuffling or random subset calculations are done. Let’s see how we can unit test algorithms that involve randomness. - Define an outline of the overall test class and a mock version of the random.choice() function - Define the When and Then aspects of the test