summaryrefslogtreecommitdiff
path: root/tests/expressions
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2024-08-09 08:43:20 -0400
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-08-13 11:26:17 +0200
commit602fe961e6834d665f2359087a1272e9f9806b71 (patch)
tree6687b9481b6e2c6a79ccf6676714a6c9b12b34a3 /tests/expressions
parent5ae99226669bc516ecb0ed17066ec11a898fddab (diff)
Fixed #35665 -- Fixed a crash when passing an empty order_by to Window.
This also caused un-ordered sliced prefetches to crash as they rely on Window. Regression in e16d0c176e9b89628cdec5e58c418378c4a2436a that made OrderByList piggy-back ExpressionList without porting the empty handling that the latter provided. Supporting explicit empty ordering on Window functions and slicing is arguably a foot-gun design due to how backends will return undeterministic results but this is a problem that requires a larger discussion. Refs #35064. Thanks Andrew Backer for the report and Mariusz for the review.
Diffstat (limited to 'tests/expressions')
-rw-r--r--tests/expressions/tests.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py
index e9e41cff1e..75aa1b0894 100644
--- a/tests/expressions/tests.py
+++ b/tests/expressions/tests.py
@@ -2315,11 +2315,6 @@ class ValueTests(TestCase):
self.assertNotEqual(value, other_value)
self.assertNotEqual(value, no_output_field)
- def test_raise_empty_expressionlist(self):
- msg = "ExpressionList requires at least one expression"
- with self.assertRaisesMessage(ValueError, msg):
- ExpressionList()
-
def test_compile_unresolved(self):
# This test might need to be revisited later on if #25425 is enforced.
compiler = Time.objects.all().query.get_compiler(connection=connection)