Skip to content

Commit

Permalink
Show that generator needs to be consumed
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Sep 25, 2024
1 parent 4b1edb7 commit 3650463
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/unittests/general/bulkparse_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# pylint: disable=C0111, C0103, W0614

import itertools

import pytest

from nav import bulkparse
Expand Down Expand Up @@ -84,7 +86,7 @@ def test_three_lines_with_two_rows_should_be_counted_as_three(self):
b"room1:10.0.0.187:myorg:OTHER:SNMP v2c read profile::\n"
)
b = bulkparse.NetboxBulkParser(data)
out_data = list(b)
itertools.consume(b)
assert b.line_num == 3

def test_short_line_should_raise_error(self):
Expand Down

0 comments on commit 3650463

Please sign in to comment.