Merge lp:~milo/linaro-image-tools/bug727776 into lp:linaro-image-tools/11.11
Proposed by
Milo Casagrande
Status: | Merged |
---|---|
Approved by: | Данило Шеган |
Approved revision: | 528 |
Merged at revision: | 529 |
Proposed branch: | lp:~milo/linaro-image-tools/bug727776 |
Merge into: | lp:linaro-image-tools/11.11 |
Diff against target: |
266 lines (+81/-22) 2 files modified
linaro_image_tools/tests/test_utils.py (+52/-9) linaro_image_tools/utils.py (+29/-13) |
To merge this branch: | bzr merge lp:~milo/linaro-image-tools/bug727776 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Данило Шеган (community) | Approve | ||
Review via email: mp+107724@code.launchpad.net |
Description of the change
Hi,
as per bug 727776, I'm proposing the following branch for merge.
I added a new test case for the '--hwpack' argument, checking it against a temp directory and raising an InvalidHwpackFile exception. I added then a new check in additional_
For the test case I based myself on the already defined test cases. I only had to define my Args class in order to pass the valid arguments.
I ran the tests suite and it runs without errors.
Thanks.
To post a comment you must log in.
Hi Milo,
Thanks for working on this.
У уто, 29. 05 2012. у 07:40 +0000, Milo Casagrande пише:
> as per bug 727776, I'm proposing the following branch for merge. option_ checkers to check that the
>
> I added a new test case for the '--hwpack' argument, checking it
> against a temp directory and raising an InvalidHwpackFile exception. I
> added then a new check in additional_
> argument passed for '--hwpack' is a regular file.
>
> For the test case I based myself on the already defined test cases. I
> only had to define my Args class in order to pass the valid arguments.
> I ran the tests suite and it runs without errors.
> Thanks.
Cool, it's worth running pep8 on the files you've modified as well:
$ pep8 linaro_ image_tools/ tests/test_ utils.py linaro_ image_tools/ utils.py image_tools/ tests/test_ utils.py: 90:5: E303 too many blank lines (2) image_tools/ tests/test_ utils.py: 140:1: W293 blank line contains whitespace image_tools/ tests/test_ utils.py: 198:1: E302 expected 2 blank lines, found 1 image_tools/ tests/test_ utils.py: 321:40: W291 trailing whitespace image_tools/ utils.py: 46:80: E501 line too long (81 characters) image_tools/ utils.py: 107:14: E111 indentation is not a multiple of four image_tools/ utils.py: 221:24: E231 missing whitespace after ',' image_tools/ utils.py: 256:17: E261 at least two spaces before inline comment image_tools/ utils.py: 297:1: W391 blank line at end of file
linaro_
linaro_
linaro_
linaro_
linaro_
linaro_
linaro_
linaro_
linaro_
(most/all are probably not your faults, but they'd be nice to clean-up
so we work towards a cleaner looking code :)
> разлике међу датотекама прилог (review-diff.txt) image_tools/ tests/test_ utils.py' image_tools/ tests/test_ utils.py 2012-04-18 13:26:25 +0000 image_tools/ tests/test_ utils.py 2012-05-29 07:39:22 +0000 ions, option_ checks,
> === modified file 'linaro_
> --- linaro_
> +++ linaro_
> @@ -44,6 +44,7 @@
> IncompatibleOpt
> prep_media_path,
> additional_
> + InvalidHwpackFile,
> )
It would be good to sort these alphabetically as well: that makes it
easier to see if an import is already there or not when one tries to add
something.
And if there are many problems like this (and pep8 stuff) that one
notices during development, it's usually better to leave them for after
the review (or review might be harder).
> sudo_args = " ".join( cmd_runner. SUDO_ARGS) "testdevice" , testboard" )))
> @@ -286,6 +287,7 @@
> device=
> board="
>
> +
Thanks for fixing this one :)
> class TestPrepMediaPa th(TestCaseWith Fixtures) : _option_ checks( self): "testdevice" , remove( "--mmc" ) e(TestCaseWithF ixtures) :
>
> def test_additional
> @@ -303,3 +305,21 @@
> device=
> board="testboard"))
> sys.argv.
> +
> +
> +class TestHwpackIsFil
> +
> + """Testing '--hwpack' option only allows file."""
"only allows regular files." sounds a bit better and is more
descriptive.
Rest of the test looks good.
> === modified file 'linaro_ image_tools/ utils.py' image_tools/ utils.py 2012-04-18 13:26:25 +0000 image_tools/ utils.py ...
> --- linaro_
> +++ linaro_