test #6426 - but you can call .all() on it and you get an empty list. This is legacy stuff, as this should be raising DetachedInstanceError.
(self, user_address_fixture)
| 316 | ) |
| 317 | |
| 318 | def test_detached_all_empty_list(self, user_address_fixture): |
| 319 | """test #6426 - but you can call .all() on it and you get an empty |
| 320 | list. This is legacy stuff, as this should be raising |
| 321 | DetachedInstanceError. |
| 322 | |
| 323 | """ |
| 324 | |
| 325 | User, Address = user_address_fixture() |
| 326 | |
| 327 | sess = fixture_session() |
| 328 | u = sess.get(User, 8) |
| 329 | sess.expunge(u) |
| 330 | |
| 331 | with testing.expect_warnings( |
| 332 | r"Instance <User .*> is detached, dynamic relationship" |
| 333 | ): |
| 334 | eq_(u.addresses.all(), []) |
| 335 | |
| 336 | with testing.expect_warnings( |
| 337 | r"Instance <User .*> is detached, dynamic relationship" |
| 338 | ): |
| 339 | eq_(list(u.addresses), []) |
| 340 | |
| 341 | def test_transient_all_empty_list(self, user_address_fixture): |
| 342 | User, Address = user_address_fixture() |
nothing calls this directly
no test coverage detected