If db.test is an empty collection, we see the following behavior:
cursor = db.test.find_raw_batches() assert next(cursor) == b""
Instead of returning empty bytes, this should instead raise StopIteration.
If db.test is an empty collection, we see the following behavior:
cursor = db.test.find_raw_batches() assert next(cursor) == b""
Instead of returning empty bytes, this should instead raise StopIteration.