(self)
| 108 | assert_raises(AttributeError, lambda: a.first) |
| 109 | |
| 110 | def test_set_immutable(self): |
| 111 | Base = declarative_base() |
| 112 | |
| 113 | class A(Base): |
| 114 | __tablename__ = "a" |
| 115 | id = Column(Integer, primary_key=True) |
| 116 | array = Column(ARRAY(Integer)) |
| 117 | first = index_property("array", 1, mutable=False) |
| 118 | |
| 119 | a = A() |
| 120 | |
| 121 | def set_(): |
| 122 | a.first = 10 |
| 123 | |
| 124 | assert_raises(AttributeError, set_) |
| 125 | |
| 126 | def test_set_mutable_dict(self): |
| 127 | Base = declarative_base() |
nothing calls this directly
no test coverage detected