this code simply subclasses the testcase class and adds method that calls the testcase assertequal method this method will either succeed or raise an exceptiondepending on whether the two parameters are equal if we run this codethe main function from unittest will give us the following outputran test in ok did you know that floats and integers can compare as equallet' add failing testdef test_str_float(self)self assertequal( " "the output of this code is more sinisteras integers and strings are not considered equalf ===========================================================failtest_str_float (__main__ checknumberstraceback (most recent call last)file "simplest_unittest py"line in test_str_float self assertequal( " "assertionerror !' ran tests in failed (failures= the dot on the first line indicates that the first test (the one we wrote beforepassed successfullythe letter after it shows that the second test failed thenat the endit gives us some informative output telling us how and where the test failedalong with summary of the number of failures