August 2018
Beginner
160 pages
4h 8m
English
It is normally the case that your application or library contains functionality that produces a data set as the result.
Testing these results is often tedious and error-prone, producing tests such as this:
def test_obtain_series_asserts(): data = obtain_series() assert data[0]["name"] == "The Office" assert data[0]["year"] == 2005 assert data[0]["rating"] == 8.8 assert data[1]["name"] == "Scrubs" assert data[1]["year"] == 2001 ...
This gets old very quickly. Also, if any of the assertion fails, then the test stops at that point, and you won't know whether any other asserts after that point would also have failed. In other words, you don't get a clear picture of the overall failures. Most of all, this is also heavily unmaintainable ...
Read now
Unlock full access