Merge lp:~unity-team/unity/unity.test-special-keys into lp:unity
Proposed by
Brandon Schaefer
on 2012-03-13
| Status: | Merged |
|---|---|
| Approved by: | Brandon Schaefer on 2012-03-13 |
| Approved revision: | 2108 |
| Merged at revision: | 2107 |
| Proposed branch: | lp:~unity-team/unity/unity.test-special-keys |
| Merge into: | lp:unity |
| Diff against target: |
284 lines (+69/-25) 2 files modified
tests/autopilot/autopilot/tests/__init__.py (+2/-0) tests/autopilot/autopilot/tests/test_dash.py (+67/-25) |
| To merge this branch: | bzr merge lp:~unity-team/unity/unity.test-special-keys |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Thomi Richards (community) | 2012-03-13 | Approve on 2012-03-13 | |
|
Review via email:
|
|||
To post a comment you must log in.
| Thomi Richards (thomir) wrote : | # |
lp:~unity-team/unity/unity.test-special-keys
updated
on 2012-03-13
- 2108. By Brandon Schaefer on 2012-03-13
-
* Fixed using ensure_dash in ALL test cases, now only in setUp and tearDown
* Fixed self.dash = Dash() being used everytime in setUp. Now in AutopilotTest


Hi,
These look great - two small things:
1) Please add "self.dash = Dash()" to AutopilotTest case - you'll see we already have self.launcher and self.switcher etc.
2) please put 'self.dash. ensure_ hidden( )' into your setup, and remove it from the tests.
3) I'm now being *really* picky, but your docstrings should ideally:
a) Start with a captial letter and end with a '.'
b) Describe the test in terms of given input and expected output, so this:
19 + def test_multi_ key(self) :
20 + """Tests that when the multi_key is pressed it will exepect a sequences"""
would be better written like this:
19 + def test_multi_ key(self) :
20 + """Pressing Multi_Key must not add add any characters to the search bar."""
and another example - before:
33 + def test_multi_ key_o(self) :
34 + """Tests the multi_key sequences ^ + o"""
after:
33 + def test_multi_ key_o(self) :
34 + """Pressing the Multi_Key followed by '^' and 'o' must produce ô."""
Number 3 is something that's good to aim for - I often don't remember to do this myself, but it helps produce tests that are easy to read and verify.
Otherwise, looks great!