Merge lp:~veebers/autopilot/recursive-object-tree into lp:autopilot
Proposed by
Christopher Lee
Status: | Merged |
---|---|
Approved by: | Thomi Richards |
Approved revision: | 177 |
Merged at revision: | 173 |
Proposed branch: | lp:~veebers/autopilot/recursive-object-tree |
Merge into: | lp:autopilot |
Diff against target: |
308 lines (+233/-47) 3 files modified
autopilot/introspection/__init__.py (+2/-47) autopilot/introspection/dbus.py (+70/-0) autopilot/tests/test_dbus_query.py (+161/-0) |
To merge this branch: | bzr merge lp:~veebers/autopilot/recursive-object-tree |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Thomi Richards (community) | Approve | ||
Review via email:
|
Commit message
Queries are now recursive from the node itself, not the root.
Description of the change
As per bug lp:1144288 queries were from the root 'downwards', now the query starts from the given node.
To post a comment you must log in.
Still need to do:
1) Update docstring to mention that:
a) The search is recursive
b) The search starts with the node you call this method on.
c) You must either specify a type name, or keyword parameters, or both.
i) When this happens. Raise an exception.
ii) Show doctest examples in the docstring for each scenarios.
2) Fix copyright header in autopilot/ tests/test_ dbus_query. Merge autopilot trunk and copy a header from another python file.
3) Fix docstring formatting on diff line 151 - closing quotes should be on a line by themselves, preceeded by a newline.
Things that are not tested:
Calling select_single with:
* neither type name nor keyword parameters specified.
* Type name specified that does not match anything in the tree (should return None)
* keyword arguments specified that does not match anything in the tree (should return None)
Calling select single with a query that returns more than one item (must raise ValueError).
Calling select_many with:
* Neither type name nor keyword arguments specified.
* kwargs only.
* a query that returns nothing.