| 304 | ) |
| 305 | |
| 306 | def test_hybrids(self, registry): |
| 307 | @registry.mapped |
| 308 | class SomeClass: |
| 309 | __tablename__ = "sc" |
| 310 | id = Column(Integer, primary_key=True) |
| 311 | data = Column(String) |
| 312 | |
| 313 | @hybrid_property |
| 314 | def foo_data(self): |
| 315 | return self.data + "_foo" |
| 316 | |
| 317 | eval_eq( |
| 318 | SomeClass.foo_data == "somedata_foo", |
| 319 | testcases=[ |
| 320 | (SomeClass(data="somedata"), True), |
| 321 | (SomeClass(data="otherdata"), False), |
| 322 | (SomeClass(data=None), None), |
| 323 | ], |
| 324 | ) |
| 325 | |
| 326 | def test_custom_op_no_impl(self): |
| 327 | """test #3162""" |