Each check we have written for the capitalize()
function is commonly referred to in testing as a statement. We'll learn more about this concept in this lesson.
What is a statement
Assertions are an integral part of tests. They are the ones that check the functionality of your code:
from capitalize import capitalize
if capitalize('hello') != 'Hello':
raise Exception('The function is not working correctly!')
if capitalize('') != '':
raise Exception('The function is not working correctly!')