Merge lp:~veebers/ubuntu-keyboard/restarting-maliit-for-tests into lp:ubuntu-keyboard
Proposed by
Christopher Lee
Status: | Merged |
---|---|
Approved by: | Thomas Moenicke |
Approved revision: | 70 |
Merged at revision: | 96 |
Proposed branch: | lp:~veebers/ubuntu-keyboard/restarting-maliit-for-tests |
Merge into: | lp:ubuntu-keyboard |
Prerequisite: | lp:~veebers/ubuntu-keyboard/autopilot-emulator-update |
Diff against target: |
84 lines (+65/-0) 1 file modified
tests/autopilot/ubuntu_keyboard/tests/test_keyboard.py (+65/-0) |
To merge this branch: | bzr merge lp:~veebers/ubuntu-keyboard/restarting-maliit-for-tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Thomas Moenicke (community) | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Thomi Richards (community) | Needs Fixing | ||
Review via email: mp+190005@code.launchpad.net |
Commit message
For ease of testing the ubuntu-keyboard testsuite takes care of restarting maliit-server with testability for the duration of the tests.
Description of the change
For ease of testing the ubuntu-keyboard testsuite takes care of restarting maliit-server with testability for the duration of the tests.
To post a comment you must log in.
Hi,
You should be aware that doing this:
66 + open(UbuntuKeyb oardTests. maliit_ override_ file, 'w').write(
67 + "exec maliit-server -testability"
68 + )
Will probably work in CPython, but does not do what you think it does in any other python implementation (CPython is the *only* python implementation that uses reference counting to control object lifetimes). A better way is like:
with open(UbuntuKeyb oardTests. maliit_ override_ file, 'w') as override_file: file.write( "exec maliit-server -testability")
override_
Otherwise, looks good, although a better solution would be to use a test fixture.