MCPcopy Create free account
hub / github.com/bpython/bpython / Spam

Class Spam

bpython/test/test_simpleeval.py:72–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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()})

Callers 1

Calls

no outgoing calls

Tested by 1