Fix test_log_beacon.py::test_log_match test on Windows

This commit is contained in:
Shane Lee 2024-02-14 14:05:59 -07:00 committed by Pedro Algarvio
parent 5ebf18260c
commit fdfb0e1310
2 changed files with 5 additions and 2 deletions

View file

@ -2,7 +2,6 @@
:codeauthor: Gareth J. Greenaway <ggreenaway@vmware.com>
"""
import pytest
import salt.modules.textfsm_mod as textfsm_mod

View file

@ -219,7 +219,11 @@ class MockFH:
def __exit__(self, exc_type, exc_val, exc_tb): # pylint: disable=unused-argument
pass
def _seek(self, pos=0):
# For some reason this gets called with additional args on Windows when
# running the following test:
# tests/pytests/unit/beacons/test_log_beacon.py::test_log_match
# Let's just absorb them with *args
def _seek(self, pos=0, *args):
self.__loc = pos
self.read_data_iter = self._iterate_read_data(self.read_data)