Merge lp:~sil2100/unity/autopilot_ibus_fixes into lp:unity
Status: | Work in progress |
---|---|
Proposed branch: | lp:~sil2100/unity/autopilot_ibus_fixes |
Merge into: | lp:unity |
Diff against target: |
50 lines (+26/-0) 1 file modified
tests/autopilot/unity/tests/test_ibus.py (+26/-0) |
To merge this branch: | bzr merge lp:~sil2100/unity/autopilot_ibus_fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity Team | Pending | ||
Review via email: mp+135901@code.launchpad.net |
Commit message
Clean the cache before every ibus test. To not lose user history, we backup the cache before doing that and restore it after the test.
Description of the change
This branch is probably still work-in-progress, as it probably doesn't fix all the problems with ibus history.
- Problem:
Some ibus autopilot tests might fail due to the ibus lookup table having preferences from previous ibus usages in the cache. Because of this, the first result that pops up when typing in ibus might be different than the expected hard-coded unicode value in the tests.
- The fix:
The real fix would be stop hard-coding unicode expected results, as even different ibus versions might return new default characters for given input. But this I'm still working on.
The fix proposed here was recommended as a temporary solution by Thomi. What we can do is actually simply clear the ibus cache before every autopilot ibus test. Not to lose user's preferences, the cache is backed up before every test, removed and then restored as a cleanup. This way, during the test execution the ibus cache on the filesystem is clean and we should be running the default ibus lookup table (see the problems section).
- Tests:
N/A
- Problems:
This solution might have some problems depending on how the ibus tests are actually executed. Once ibus is running, clearing the cache on the filesystem does nothing. So, if ibus is already running when autopilot is executed, clearing the cache probably won't do much good, since right now I *think* that the ibus daemon is not restarted on every test (please correct me if I'm wrong).
Unmerged revisions
- 2920. By Łukasz Zemczak
-
Clean the cache before every ibus test. To not lose user history, we backup the cache before doing that and restore it after the test.
The problem with this, is it isn't going to clear out say ibus-anthy because it is stored in ~/.anthy/<some file in here>