Python afirmações com propriedade de classe
from unittest import TestCase
class MyTest(TestCase):
def test_property(self):
# Test that Type Error is correctly raised
obj = MyClass("foobar")
self.assertRaises(TypeError, lambda: x.my_property, obj)
Ahh the negotiatior