MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / test_column_accessor_unary

Method test_column_accessor_unary

test/sql/test_resultset.py:977–987  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

975
976 @testing.emits_warning("Column-expression-level unary distinct")
977 def test_column_accessor_unary(self, connection):
978 users = self.tables.users
979
980 connection.execute(users.insert(), dict(user_id=1, user_name="john"))
981
982 # unary expressions
983 r = connection.execute(
984 select(users.c.user_name.distinct()).order_by(users.c.user_name)
985 ).first()
986 eq_(r._mapping[users.c.user_name], "john")
987 eq_(r.user_name, "john")
988
989 @testing.fixture
990 def _ab_row_fixture(self, connection):

Callers

nothing calls this directly

Calls 7

selectFunction · 0.90
eq_Function · 0.90
executeMethod · 0.45
insertMethod · 0.45
firstMethod · 0.45
order_byMethod · 0.45
distinctMethod · 0.45

Tested by

no test coverage detected