def test_catches_syntax_error(self): with self.assertRaises(autocomplete.EvaluationError): autocomplete.safe_eval("1re", {})
def test_catches_syntax_error(self): with self.assertRaises(autocomplete.EvaluationError): autocomplete.safe_eval('1re', {})
def test_catches_syntax_error(self): try: autocomplete.safe_eval('1re',{}) except: self.fail('safe_eval raises an error')