summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2022-09-26 02:33:19 +0000
committerGerrit Code Review <gerrit@ci3.zzzcomputing.com>2022-09-26 02:33:19 +0000
commit1657cea73d5ec9aeedd541001e125e03e581a34b (patch)
treeb1d8527435fa51f7cec399972ea5af29d4f74a67 /test/dialect/postgresql
parente708cfea0bdaae82ac30dd7d33f9442115b9af6d (diff)
parentc86ec8f8c98b756ef06933174a3f4a0f3cfbed41 (diff)
downloadsqlalchemy-1657cea73d5ec9aeedd541001e125e03e581a34b.tar.gz
Merge "`aggregate_order_by` now supports cache generation." into main
Diffstat (limited to 'test/dialect/postgresql')
-rw-r--r--test/dialect/postgresql/test_compiler.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py
index 67e54e4f5..c763dbeac 100644
--- a/test/dialect/postgresql/test_compiler.py
+++ b/test/dialect/postgresql/test_compiler.py
@@ -3465,3 +3465,36 @@ class RegexpTest(fixtures.TestBase, testing.AssertsCompiledSQL):
"SELECT 1 " + exp,
checkparams=params,
)
+
+
+class CacheKeyTest(fixtures.CacheKeyFixture, fixtures.TestBase):
+ def test_aggregate_order_by(self):
+ """test #8574"""
+
+ self._run_cache_key_fixture(
+ lambda: (
+ aggregate_order_by(column("a"), column("a")),
+ aggregate_order_by(column("a"), column("b")),
+ aggregate_order_by(column("a"), column("a").desc()),
+ aggregate_order_by(column("a"), column("a").nulls_first()),
+ aggregate_order_by(
+ column("a"), column("a").desc().nulls_first()
+ ),
+ aggregate_order_by(column("a", Integer), column("b")),
+ aggregate_order_by(column("a"), column("b"), column("c")),
+ aggregate_order_by(column("a"), column("c"), column("b")),
+ aggregate_order_by(
+ column("a"), column("b").desc(), column("c")
+ ),
+ aggregate_order_by(
+ column("a"), column("b").nulls_first(), column("c")
+ ),
+ aggregate_order_by(
+ column("a"), column("b").desc().nulls_first(), column("c")
+ ),
+ aggregate_order_by(
+ column("a", Integer), column("a"), column("b")
+ ),
+ ),
+ compare_values=False,
+ )