ac_power¶
Source code: ac_power.py
A test to ensure the power type and status of device under test.
Description¶
The test detects the power type of the underlying device. It is also used to ask operator to unplug the AC from the device.
Test Procedure¶
To test if plugged AC power is detected properly:
Plug the designated power source to the device, and unplug all the other power sources.
Starts the test.
To test AC power unplugged:
Starts the test.
Follow the instruction on the UI to unplug the power.
Dependency¶
Need a power source.
For plugged with required power range: - Need a USB PD power source with required power range.
Examples¶
To test AC unplugged, add this to test list:
{
"pytest_name": "ac_power",
"args": {
"online": false
}
}
To test USBPD 45W plugged on usbpd port 0:
{
"pytest_name": "ac_power",
"args": {
"power_type": "USB_PD",
"usbpd_power_range": [0, 45, 45],
"online": true
}
}
Test Arguments¶
Name |
Type |
Description |
---|---|---|
power_type |
str, None |
(optional; default: |
usbpd_power_range |
list, None |
(optional; default: |
online |
bool |
(optional; default: |
bft_fixture |
dict, None |
(optional; default:
The default value of |
retries |
int, None |
(optional; default: |
polling_period_secs |
Real |
(optional; default: |
silent_warning |
int |
(optional; default: |