Add exception handling tests, PEP8