Code review comment for lp:~barry/ubiquity/bug-792652

Revision history for this message
Evan (ev) wrote :

From IRC:
[2:45pm] barry: cjwatson: branch update pushed; i'm not going to push to a different branch name
[2:48pm] cjwatson: barry: this is going to come across as a bit "oh, and another thing" - but I think it should be possible to unit-test this, and it'd be a good exercise
[2:49pm] cjwatson: you would do that by instantiating the UI widget in a test, firing the try-ubuntu-clicked event twice, and only then processing events
[2:49pm] barry: cjwatson: sure, it would be a good exercise for me to figure out how to do that. so, let me look into that.
[2:49pm] cjwatson: the wiki has details on running the test suite
[2:49pm] barry: cool. first, more tea, then i'll look at that
[2:49pm] cjwatson: in this case I guess the test case ought to go in tests/test_language.pyp
[2:49pm] cjwatson: -p
[2:50pm] cjwatson: (and I think it'd be good for other folks to see how that's done, too, UI tests being their own special black art)
[2:50pm] cjwatson: I don't especially care about separate tests for the KDE frontend - there's no framework for that as yet - but at least the GTK frontend
[2:50pm] barry: right. i've never done that before, so it's good to learn it.
[2:50pm] barry: brb
[2:51pm] cjwatson: there's a "gtkwidgets.refresh()" helper that processes any events that are pending
[2:51pm] cjwatson: you'll see it used in other tests
[2:51pm] cjwatson: the trick here may be in arranging for the backend filter to be in place

« Back to merge proposal