(self)
| 1182 | __dialect__ = "default" |
| 1183 | |
| 1184 | def _fixture(self): |
| 1185 | Base = declarative_base() |
| 1186 | |
| 1187 | class A(Base): |
| 1188 | __tablename__ = "a" |
| 1189 | id = Column(Integer, primary_key=True) |
| 1190 | _value = Column("value", String) |
| 1191 | |
| 1192 | @hybrid.hybrid_method |
| 1193 | def value(self, x): |
| 1194 | "This is an instance-level docstring" |
| 1195 | return int(self._value) + x |
| 1196 | |
| 1197 | @value.expression |
| 1198 | def value(cls, value): |
| 1199 | "This is a class-level docstring" |
| 1200 | return func.foo(cls._value, value) + value |
| 1201 | |
| 1202 | @hybrid.hybrid_method |
| 1203 | def other_value(self, x): |
| 1204 | "This is an instance-level docstring" |
| 1205 | return int(self._value) + x |
| 1206 | |
| 1207 | @other_value.expression |
| 1208 | def other_value(cls, value): |
| 1209 | return func.foo(cls._value, value) + value |
| 1210 | |
| 1211 | return A |
| 1212 | |
| 1213 | def test_call(self): |
| 1214 | A = self._fixture() |
no test coverage detected