From fddb5476be22796bd3af90a6acd29d1420989ac0 Mon Sep 17 00:00:00 2001 From: Johanna England Date: Wed, 25 Sep 2024 14:48:37 +0200 Subject: [PATCH] Show that generator needs to be consumed --- tests/unittests/general/bulkparse_test.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/unittests/general/bulkparse_test.py b/tests/unittests/general/bulkparse_test.py index 2fcba55a93..1af775a793 100644 --- a/tests/unittests/general/bulkparse_test.py +++ b/tests/unittests/general/bulkparse_test.py @@ -1,7 +1,6 @@ """Tests for bulkparse""" # pylint: disable=C0111, C0103, W0614 - import pytest from nav import bulkparse @@ -84,7 +83,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) + list(b) # Generator needs to be consumed for this test to succeed assert b.line_num == 3 def test_short_line_should_raise_error(self):