Update UT after Arvind's exception handling changes. Fix pep8 warnings.