Skip to content

Commit dd05caf

Browse files
committed
[#91202] DA9062: skip current,ldos if parameters are not set
1 parent be35095 commit dd05caf

File tree

1 file changed

+6
-0
lines changed
  • protoplaster/tests/pmic/DA9062

1 file changed

+6
-0
lines changed

protoplaster/tests/pmic/DA9062/test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pytest
12
from protoplaster.conf.module import ModuleName
23
from protoplaster.tests.pmic.DA9062.DA9062 import DA9062, ldo_selection
34

@@ -61,6 +62,9 @@ def test_current_selections(self):
6162
LDO{{ ldo['ldo_id'] }}, {% endfor -%}
6263
{%- endmacro %}
6364
"""
65+
if not self.current_selections:
66+
pytest.skip("current_selections parameter not set")
67+
6468
for ldo in self.current_selections:
6569
val = self.pmic.get_ldo_curr_selection(ldo['ldo_id'])
6670
exp = ldo_selection[ldo['ldo_selection']]
@@ -72,6 +76,8 @@ def test_current_ldos(self):
7276
verify voltage of: {% for ldo in device['current_voltages'] -%}LDO{{ ldo['ldo_id'] }}({{ ldo['min_voltage'] or '-inf'}}, {{ ldo['max_voltage'] or '+inf'}}), {% endfor -%}
7377
{%- endmacro %}
7478
"""
79+
if not self.current_voltages:
80+
pytest.skip("current_voltages parameter not set")
7581

7682
for ldo in self.current_voltages:
7783
curr_voltage = self.pmic.get_ldo_curr_voltage(ldo['ldo_id'])

0 commit comments

Comments
 (0)