Skip to content

Commit

Permalink
Additional test.
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Nov 10, 2024
1 parent ed6a6e2 commit 73f0453
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/regressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,15 @@ class TestQueryCountList(ModelTestCase):

def test_iteration_single_query(self):
with self.assertQueryCount(1):
list(User.select())
sq = User.select()
for i in range(3):
self.assertEqual(list(sq), [])
self.assertFalse(bool(sq))
with self.assertQueryCount(1):
sq = User.select().tuples()
for i in range(3):
self.assertEqual(list(sq), [])
self.assertFalse(bool(sq))
with self.assertQueryCount(1):
self.assertEqual(User.select().count(), 0)

Expand Down

0 comments on commit 73f0453

Please sign in to comment.