MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_columns_mismatched_future

Method test_columns_mismatched_future

test/orm/test_query.py:5824–5843  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5822 )
5823
5824 def test_columns_mismatched_future(self):
5825 # test that columns using column._label match, as well as that
5826 # ordering doesn't matter
5827 User = self.classes.User
5828
5829 s = fixture_session()
5830 q = select(User).from_statement(
5831 text(
5832 "select name, 27 as foo, id as users_id from users order by id"
5833 )
5834 )
5835 eq_(
5836 s.execute(q).scalars().all(),
5837 [
5838 User(id=7, name="jack"),
5839 User(id=8, name="ed"),
5840 User(id=9, name="fred"),
5841 User(id=10, name="chuck"),
5842 ],
5843 )
5844
5845 def test_columns_multi_table_uselabels(self):
5846 # test that columns using column._label match, as well as that

Callers

nothing calls this directly

Calls 9

fixture_sessionFunction · 0.90
selectFunction · 0.90
textFunction · 0.90
eq_Function · 0.90
UserClass · 0.70
from_statementMethod · 0.45
allMethod · 0.45
scalarsMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected