initial/predictions/initial_0/django__django-12039_eval.sh
#!/bin/bash
set -uxo pipefail
source /opt/miniconda3/bin/activate
conda activate testbed
cd /testbed
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
export LANG=en_US.UTF-8
export LANGUAGE=en_US:en
export LC_ALL=en_US.UTF-8
git config --global --add safe.directory /testbed
cd /testbed
git status
git show
git diff 58c1acb1d6054dfec29d0f30b1033bae6ef62aec
source /opt/miniconda3/bin/activate
conda activate testbed
python -m pip install -e .
git checkout 58c1acb1d6054dfec29d0f30b1033bae6ef62aec tests/indexes/tests.py
git apply -v - <<'EOF_114329324912'
diff --git a/tests/indexes/tests.py b/tests/indexes/tests.py
--- a/tests/indexes/tests.py
+++ b/tests/indexes/tests.py
@@ -75,6 +75,22 @@ def test_index_together_single_list(self):
         index_sql = connection.schema_editor()._model_indexes_sql(IndexTogetherSingleList)
         self.assertEqual(len(index_sql), 1)
 
+    def test_columns_list_sql(self):
+        index = Index(fields=['headline'], name='whitespace_idx')
+        editor = connection.schema_editor()
+        self.assertIn(
+            '(%s)' % editor.quote_name('headline'),
+            str(index.create_sql(Article, editor)),
+        )
+
+    def test_descending_columns_list_sql(self):
+        index = Index(fields=['-headline'], name='whitespace_idx')
+        editor = connection.schema_editor()
+        self.assertIn(
+            '(%s DESC)' % editor.quote_name('headline'),
+            str(index.create_sql(Article, editor)),
+        )
+
 
 @skipIf(connection.vendor == 'postgresql', 'opclasses are PostgreSQL only')
 class SchemaIndexesNotPostgreSQLTests(TransactionTestCase):
@@ -223,6 +239,30 @@ def test_ops_class_descending_partial(self):
             cursor.execute(self.get_opclass_query % indexname)
             self.assertCountEqual(cursor.fetchall(), [('text_pattern_ops', indexname)])
 
+    def test_ops_class_columns_lists_sql(self):
+        index = Index(
+            fields=['headline'],
+            name='whitespace_idx',
+            opclasses=['text_pattern_ops'],
+        )
+        with connection.schema_editor() as editor:
+            self.assertIn(
+                '(%s text_pattern_ops)' % editor.quote_name('headline'),
+                str(index.create_sql(Article, editor)),
+            )
+
+    def test_ops_class_descending_columns_list_sql(self):
+        index = Index(
+            fields=['-headline'],
+            name='whitespace_idx',
+            opclasses=['text_pattern_ops'],
+        )
+        with connection.schema_editor() as editor:
+            self.assertIn(
+                '(%s text_pattern_ops DESC)' % editor.quote_name('headline'),
+                str(index.create_sql(Article, editor)),
+            )
+
 
 @skipUnless(connection.vendor == 'mysql', 'MySQL tests')
 class SchemaIndexesMySQLTests(TransactionTestCase):

EOF_114329324912
./tests/runtests.py --verbosity 2 --settings=test_sqlite --parallel 1 indexes.tests
git checkout 58c1acb1d6054dfec29d0f30b1033bae6ef62aec tests/indexes/tests.py
