Skip to content

Commit 6598eab

Browse files
committed
add smoke test for BatchStatement.__len__
1 parent af0b853 commit 6598eab

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/unit/test_query.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,10 @@ def test_add_all(self):
6666
bound_statements = [t[1] for t in batch._statements_and_parameters]
6767
str_parameters = [str(i) for i in range(10)]
6868
self.assertEqual(bound_statements, str_parameters)
69+
70+
def test_len(self):
71+
for n in 0, 10, 100:
72+
batch = BatchStatement()
73+
batch.add_all(statements=['%s'] * n,
74+
parameters=[(i,) for i in range(n)])
75+
self.assertEqual(len(batch), n)

0 commit comments

Comments
 (0)