MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_intersect_unions_2

Method test_intersect_unions_2

test/sql/test_query.py:1341–1355  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

1339
1340 @testing.requires.intersect
1341 def test_intersect_unions_2(self, connection):
1342 t1, t2, t3 = self.tables("t1", "t2", "t3")
1343
1344 u = intersect(
1345 union(select(t1.c.col3, t1.c.col4), select(t3.c.col3, t3.c.col4))
1346 .alias()
1347 .select(),
1348 union(select(t2.c.col3, t2.c.col4), select(t3.c.col3, t3.c.col4))
1349 .alias()
1350 .select(),
1351 )
1352 wanted = [("aaa", "ccc"), ("bbb", "aaa"), ("ccc", "bbb")]
1353 found = self._fetchall_sorted(connection.execute(u))
1354
1355 eq_(found, wanted)
1356
1357 @testing.requires.intersect
1358 def test_intersect_unions_3(self, connection):

Callers

nothing calls this directly

Calls 8

_fetchall_sortedMethod · 0.95
intersectFunction · 0.90
unionFunction · 0.90
selectFunction · 0.90
eq_Function · 0.90
selectMethod · 0.45
aliasMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected