Skip to content

Commit

Permalink
fix: make force naming of reset parameter, change pop(reset) to get(r…
Browse files Browse the repository at this point in the history
…eset)
  • Loading branch information
igor udot (horw) committed Sep 19, 2023
1 parent c082061 commit 472fd39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pytest-embedded-idf/pytest_embedded_idf/unity_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def wrapper(self, *args, **kwargs):
try:
# do it here since the first hard reset before test case shouldn't be counted in duration time
if 'reset' in kwargs:
if kwargs.pop('reset') and self._hard_reset_func:
if kwargs.get('reset') and self._hard_reset_func:
try:
self._hard_reset_func()
except NotImplementedError:
Expand Down Expand Up @@ -327,6 +327,7 @@ def _add_single_unity_test_case(
def _run_normal_case(
self,
case: UnittestMenuCase,
*,
reset: bool = False, # noqa
timeout: float = 30,
) -> None:
Expand All @@ -352,6 +353,7 @@ def _run_normal_case(
def _run_multi_stage_case(
self,
case: UnittestMenuCase,
*,
reset: bool = False, # noqa
timeout: float = 30,
) -> None:
Expand Down Expand Up @@ -792,7 +794,7 @@ def run_normal_case(self, case: UnittestMenuCase, reset: bool = False, timeout:
reset: whether do a hardware reset before running the case
timeout: timeout in second
"""
self.first_dut._run_normal_case(case, reset, timeout=timeout)
self.first_dut._run_normal_case(case, reset=reset, timeout=timeout)

def run_multi_stage_case(self, case: UnittestMenuCase, reset: bool = False, timeout: int = 90) -> None:
"""
Expand Down

0 comments on commit 472fd39

Please sign in to comment.