battery ======= **Source code:** `battery.py `_ A test to check if DUT can communicate with battery. Description ----------- The test uses device API to get battery design capacity, and check that the capacity lies in the range given in `design_capacity_range`. Test Procedure -------------- This is an automated test without user interaction. Dependency ---------- Device API `power.GetBatteryDesignCapacity`. This is usually implemented in `/sys` with properties like `charge_full_design` or command `ectool battery`. Examples -------- To check if the battery design capacity lies in default range ([1000, 10000]), add this in test list: .. test_list:: generic_battery_examples:BatteryTests.BatteryCapacity To check if the battery design capacity lies in [4000, 8000], add this in test list: .. test_list:: generic_battery_examples:BatteryTests.BatteryCapacityBetween4000And8000 Test Arguments -------------- .. list-table:: :widths: 20 10 60 :header-rows: 1 :align: left * - Name - Type - Description * - design_capacity_range - list - (optional; default: ``[1000, 10000]``) Expected battery design capacity range in mAh. Ex: [1000, 10000]