stylus_garage¶
Source code: stylus_garage.py
Tests stylus garage detection functionality.
Description¶
Verifies if stylus garage is functional by asking operator to insert and remove the stylus.
Test Procedure¶
Operator inserts the stylus into the stylus garage.
Operator removes the stylus from the stylus garage.
Dependency¶
Based on Linux evdev.
Examples¶
To run default test:
{
"pytest_name": "stylus_garage",
"label": "Stylus Garage",
"run_if": "not constants.has_device_data or device.component.has_stylus_garage",
"related_components": [
"test_tags.TestCategory.EMR_IC",
"test_tags.TestCategory.USI_CONTROLLER"
]
}
To test both of the stylus and the garage with a test group:
{
"label": "Stylus And Garage",
"subtests": [
{
"pytest_name": "stylus_garage",
"label": "Remove stylus",
"run_if": "not constants.has_device_data or device.component.has_stylus_garage",
"related_components": [
"test_tags.TestCategory.EMR_IC",
"test_tags.TestCategory.USI_CONTROLLER"
],
"args": {
"target_state": "ejected"
}
},
{
"pytest_name": "stylus",
"label": "Stylus",
"run_if": "not constants.has_device_data or device.component.has_stylus",
"related_components": [
"test_tags.TestCategory.EMR_IC",
"test_tags.TestCategory.USI_CONTROLLER"
]
},
{
"pytest_name": "stylus_garage",
"label": "Insert stylus",
"run_if": "not constants.has_device_data or device.component.has_stylus_garage",
"related_components": [
"test_tags.TestCategory.EMR_IC",
"test_tags.TestCategory.USI_CONTROLLER"
],
"args": {
"target_state": "inserted"
}
}
]
}
Test Arguments¶
Name |
Type |
Description |
---|---|---|
timeout_secs |
int |
(optional; default: |
device_filter |
int, str, None |
(optional; default: |
garage_is_stylus |
bool |
(optional; default: |
target_state |
[‘ejected’, ‘inserted’], None |
(optional; default: |