Asking for a specific autopilot stack backend should either succeed or raise an exception
Bug #1169355 reported by
Thomi Richards
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Autopilot |
Fix Released
|
High
|
Unassigned | ||
autopilot (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Raring |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Currently you can do this:
>>> from autopilot.input import Keyboard
>>> kbd = Keyboard.
>>> type(kbd)
autopilot.
So here autopilot has silently decided that it cannot give us the backend variant we asked for, and has decided that giving us anything is better than raising an exception.
However, I'm not sure that's a good idea.
Certainly creating a keyboard with:
kbd = Keyboard.create()
should return any keyboard. But if we ask for a specific type, we should either get that type, or fail.
Related branches
lp://staging/~thomir-deactivatedaccount/autopilot/fix-pick-variant
- Christopher Lee (community): Approve
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 422 lines (+173/-65)18 files modifiedautopilot/__init__.py (+14/-4)
autopilot/display/__init__.py (+17/-7)
autopilot/input/__init__.py (+51/-19)
autopilot/process/__init__.py (+15/-5)
autopilot/tests/test_custom_exceptions.py (+31/-0)
autopilot/utilities.py (+9/-2)
docs/_templates/indexcontent.html (+1/-1)
docs/api/autopilot.rst (+8/-10)
docs/api/display.rst (+2/-2)
docs/api/emulators.rst (+2/-2)
docs/api/gestures.rst (+2/-2)
docs/api/index.rst (+10/-0)
docs/api/input.rst (+2/-2)
docs/api/introspection.rst (+2/-2)
docs/api/matchers.rst (+2/-2)
docs/api/platform.rst (+2/-2)
docs/api/testcase.rst (+2/-2)
docs/conf.py (+1/-1)
Changed in autopilot: | |
milestone: | none → 1.3 |
Changed in autopilot: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Fix committed into lp:autopilot at revision 159, scheduled for release in autopilot, milestone 1.3