unittest is Python’s standard-library framework for writing unit tests. It requires no separate installation, supplies many assertions, and confirms individual code units in isolation, though its syntax can be verbose. section 6.1.1
Testing department statistics
A TestDepartmentStatisticsVisitor test visits a department containing two employees, then asserts total salaries of 110000, two employees, and an average salary of 55000.



