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