initial/predictions/initial_0/django__django-9296_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 84322a29ce9b0940335f8ab3d60e55192bef1e50
source /opt/miniconda3/bin/activate
conda activate testbed
python -m pip install -e .
git checkout 84322a29ce9b0940335f8ab3d60e55192bef1e50 tests/pagination/tests.py
git apply -v - <<'EOF_114329324912'
diff --git a/tests/pagination/tests.py b/tests/pagination/tests.py
--- a/tests/pagination/tests.py
+++ b/tests/pagination/tests.py
@@ -297,6 +297,13 @@ def test_get_page_empty_object_list_and_allow_empty_first_page_false(self):
         with self.assertRaises(EmptyPage):
             paginator.get_page(1)
 
+    def test_paginator_iteration(self):
+        paginator = Paginator([1, 2, 3], 2)
+        page_iterator = iter(paginator)
+        for page, expected in enumerate(([1, 2], [3]), start=1):
+            with self.subTest(page=page):
+                self.assertEqual(expected, list(next(page_iterator)))
+
 
 class ModelPaginationTests(TestCase):
     """

EOF_114329324912
./tests/runtests.py --verbosity 2 --settings=test_sqlite --parallel 1 pagination.tests
git checkout 84322a29ce9b0940335f8ab3d60e55192bef1e50 tests/pagination/tests.py
