MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_with_labels

Method test_with_labels

test/orm/test_deprecations.py:553–565  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

551 )
552
553 def test_with_labels(self):
554 User = self.classes.User
555
556 with testing.expect_deprecated_20(
557 r"The Query.with_labels\(\) and Query.apply_labels\(\) "
558 "method is considered legacy"
559 ):
560 q = fixture_session().query(User).with_labels().statement
561
562 self.assert_compile(
563 q,
564 "SELECT users.id AS users_id, users.name AS users_name FROM users",
565 )
566
567
568class LazyLoadOptSpecificityTest(fixtures.DeclarativeMappedTest):

Callers

nothing calls this directly

Calls 4

fixture_sessionFunction · 0.90
with_labelsMethod · 0.80
assert_compileMethod · 0.80
queryMethod · 0.45

Tested by

no test coverage detected