Skip to content

Commit

Permalink
fix: rename expect_exact, expect to _expect_exact, _expect
Browse files Browse the repository at this point in the history
  • Loading branch information
igor udot (horw) committed Nov 14, 2023
1 parent a49532f commit 966fb9a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pytest-embedded-idf/pytest_embedded_idf/unity_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,12 +483,12 @@ def close(self):
self.work.close()

def run_case(self):
yield from self.expect_exact(READY_PATTERN_LIST, self.wait_for_menu_timeout)
yield from self._expect_exact(READY_PATTERN_LIST, self.wait_for_menu_timeout)

for retry in range(self.start_retry):
self.dut.write(str(self.case.index))
try:
yield from self.expect_exact(self.case.name, 1)
yield from self._expect_exact(self.case.name, 1)
break
except TIMEOUT as e:
if retry >= self.start_retry - 1:
Expand All @@ -503,7 +503,7 @@ def run_case(self):
if _timeout < 0:
raise TIMEOUT('Tasks timed out, without other exception')

pat = yield from self.expect(self.signal_pattern_list, _timeout)
pat = yield from self._expect(self.signal_pattern_list, _timeout)

if pat is not None:
match_str = pat.group().decode('utf-8')
Expand Down Expand Up @@ -536,7 +536,7 @@ def run_case(self):
log = remove_asci_color_code(self.dut.pexpect_proc.before)
return log, additional_attrs

def expect_exact(self, pattern, timeout):
def _expect_exact(self, pattern, timeout):
start = time.perf_counter()
while True:
try:
Expand All @@ -547,7 +547,7 @@ def expect_exact(self, pattern, timeout):
if time.perf_counter() - start > timeout:
raise e

def expect(self, pattern, timeout):
def _expect(self, pattern, timeout):
start = time.perf_counter()
while True:
try:
Expand Down

0 comments on commit 966fb9a

Please sign in to comment.