google / mobly

E2E test framework for tests with complex environment requirements.
https://github.com/google/mobly
Apache License 2.0
621 stars 174 forks source link

[WIP] Make AndroidDevice#build_info strictly returns a dict #924

Closed mhaoli closed 3 weeks ago

mhaoli commented 3 weeks ago

Now AndroidDevice#build_info returns a None when in fastboot and a dict otherwise.

I'm not quite sure if we were intentionally returning a None when the device is in fastboot. But I think making it strictly return a dict looks more reliable. So users won't get errors like

"TypeError: 'NoneType' object is not subscriptable"

WDYT @xpconanfan ?


This change is Reviewable

mhaoli commented 3 weeks ago

I can update docstring and other things if we agree this change makes sense.