Merge lp://qastaging/~dooferlad/linaro-image-tools/fetch_image_gui into lp://qastaging/linaro-image-tools/11.11

Proposed by James Tunnicliffe
Status: Rejected
Rejected by: Loïc Minier
Proposed branch: lp://qastaging/~dooferlad/linaro-image-tools/fetch_image_gui
Merge into: lp://qastaging/linaro-image-tools/11.11
Prerequisite: lp://qastaging/~dooferlad/linaro-image-tools/fetch_image_server_indexer
Diff against target: 1749 lines (+1740/-0)
2 files modified
fetch_image.py (+79/-0)
fetch_image_ui.py (+1661/-0)
To merge this branch: bzr merge lp://qastaging/~dooferlad/linaro-image-tools/fetch_image_gui
Reviewer Review Type Date Requested Status
James Westby (community) Approve
Review via email: mp+66917@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2011-06-17.

Description of the change

Initial merge request of fetch_image_ui.py - a GUI with similar functionality to fetch_image.py.

The GUI guides the user through the process of creating an image for their ARM hardware. Files are pulled as required from release.linaro.org and snapshots.linaro.org and combined using linaro-media-create.

--

Now with split up unit tests!

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote : Posted in a previous version of this proposal

133 + if(style != None):
134 + radio_button = wx.RadioButton(bind_to, label = label, style = style)
135 + else:
136 + radio_button = wx.RadioButton(bind_to, label = label)

I think that's unnecessary isn't it? style=None is usually the default.

(also we usually avoid spaces around = in method calls)

226 + if "panda" in self.settings['choice']['hardware'].keys():
227 + default_hardware = "panda"

Was this just to make your testing easier? I don't think that the choice should
have a default until we're in a position to remember their last answer.

1562 + def test_url_lookup(self):

Please break up this test in to several tests. These sort of test cases
are a nightmare to debug. Ideally each test method should assert a single
thing.

Thanks,

James

Revision history for this message
James Westby (james-w) : Posted in a previous version of this proposal
review: Needs Fixing
Revision history for this message
James Tunnicliffe (dooferlad) wrote : Posted in a previous version of this proposal

On 24 June 2011 21:58, James Westby <email address hidden> wrote:
> 133     +    if(style != None):
> 134     +        radio_button = wx.RadioButton(bind_to, label = label, style = style)
> 135     +    else:
> 136     +        radio_button = wx.RadioButton(bind_to, label = label)
>
> I think that's unnecessary isn't it? style=None is usually the default.

In this case, sadly not.

> (also we usually avoid spaces around = in method calls)

Noted and fixed.

> 226     +        if "panda" in self.settings['choice']['hardware'].keys():
> 227     +            default_hardware = "panda"
>
> Was this just to make your testing easier? I don't think that the choice should
> have a default until we're in a position to remember their last answer.

Mostly yes. I am sure we could have nothing selected and the next
button disabled by default. I didn't think it was too cheeky to do
since there are a lot of panda boards in the hands of Linaro engineers
:-) I am sure in the future we could remember some choices between
runs as well, which would be useful for just getting the latest build
for your board.

> 1562    +    def test_url_lookup(self):
>
> Please break up this test in to several tests. These sort of test cases
> are a nightmare to debug. Ideally each test method should assert a single
> thing.

I have split it into three, with functions named such that if test x
requires test y to pass before it will pass, x will run first.

--
James Tunnicliffe

Revision history for this message
James Westby (james-w) :
review: Approve
Revision history for this message
Loïc Minier (lool) wrote :

This is marked as approved but not merged, but I see similar code in linaro-image-tools; I guess this really was superseded?

Revision history for this message
James Tunnicliffe (dooferlad) wrote :

Indeed it was.

On 8 August 2011 22:51, Loïc Minier <email address hidden> wrote:
> This is marked as approved but not merged, but I see similar code in linaro-image-tools; I guess this really was superseded?
> --
> https://code.launchpad.net/~dooferlad/linaro-image-tools/fetch_image_gui/+merge/66917
> You are the owner of lp:~dooferlad/linaro-image-tools/fetch_image_gui.
>

--
James Tunnicliffe

Unmerged revisions

362. By James Tunnicliffe

Slight style clean up.

361. By James Tunnicliffe

Split unit test into three cases.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches