| 70 | |
| 71 | def test_operators_on_suspicious_types(self): |
| 72 | class Spam(numbers.Number): |
| 73 | def __add__(inner_self, other): |
| 74 | self.fail("doing attribute lookup might have side effects") |
| 75 | |
| 76 | with self.assertRaises(ValueError): |
| 77 | simple_eval("a + 1", {"a": Spam()}) |
no outgoing calls