Modified tests for self.assertRaises so it doesn't catch some other error. Fixed some PEP8 warnings
Merge remote-tracking branch 'origin/master'