python Python/Unittest : assertRaises raises Error Python unittest tutorial explaining how to properly test exception handling using assertRaises. Shows the common mistake of calling the function directly and the correct solution using lambda expressions.