Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Issue 8223016: Style cleanups for test.py (Closed)

Created:
9 years, 2 months ago by zundel
Modified:
9 years, 2 months ago
Reviewers:
ahe
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Style cleanups for test.py This reformats test.py to have consistent Python style. Committed: https://code.google.com/p/dart/source/detail?r=353

Patch Set 1 #

Total comments: 19
Unified diffs Side-by-side diffs Delta from patch set Stats (+596 lines, -458 lines) Patch
M tools/test.py View 46 chunks +431 lines, -455 lines 12 comments Download
M tools/testing/test_runner.py View 3 chunks +160 lines, -3 lines 7 comments Download
M tools/utils.py View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
zundel
*If you aren't going to have time to look at this soon, let me know ...
9 years, 2 months ago (2011-10-10 23:48:57 UTC) #1
ahe
LGTM. Thank you for doing this! The new comments are really helpful! Cheers, Peter http://codereview.chromium.org/8223016/diff/1/tools/test.py ...
9 years, 2 months ago (2011-10-11 07:55:34 UTC) #2
zundel
9 years, 2 months ago (2011-10-11 22:45:44 UTC) #3
r353

http://codereview.chromium.org/8223016/diff/1/tools/test.py
File tools/test.py (right):

http://codereview.chromium.org/8223016/diff/1/tools/test.py#newcode568
tools/test.py:568: def __init__(self, workspace, verbose, os_def, timeout,
On 2011/10/11 07:55:34, ahe wrote:
> I'm not sure what os_def means. Would you mind not abbreviating "def"?

os conflicts with import os, so I renamed it.  I'll rename it again.

http://codereview.chromium.org/8223016/diff/1/tools/test.py#newcode975
tools/test.py:975: """Matches a test case with the test prefixes requested on
the cmdline?
On 2011/10/11 07:55:34, ahe wrote:
> ? -> .

Done.

http://codereview.chromium.org/8223016/diff/1/tools/test.py#newcode1103
tools/test.py:1103: """Confiigures the Python optparse library with the cmdline
for test.py."""
On 2011/10/11 07:55:34, ahe wrote:
> Confiigures -> Configures

Done.

http://codereview.chromium.org/8223016/diff/1/tools/test.py#newcode1273
tools/test.py:1273: return (len(o) == 2) and (testing.FAIL in o) and
(testing.OKAY in o)
On 2011/10/11 07:55:34, ahe wrote:
> Add newline.

Done.

http://codereview.chromium.org/8223016/diff/1/tools/test.py#newcode1299
tools/test.py:1299: # We don't want to end the program.
On 2011/10/11 07:55:34, ahe wrote:
> We should probably improve this. It is a bit of a hack.

Added TODO

http://codereview.chromium.org/8223016/diff/1/tools/test.py#newcode1320
tools/test.py:1320: pattern = '^' + self.pattern.replace('*', '.*') + '$'
On 2011/10/11 07:55:34, ahe wrote:
> I think the style guide prefer:
> '^%s$' % self.pattern.replace('*', '.*')

Done.

http://codereview.chromium.org/8223016/diff/1/tools/testing/test_runner.py
File tools/testing/test_runner.py (right):

http://codereview.chromium.org/8223016/diff/1/tools/testing/test_runner.py#ne...
tools/testing/test_runner.py:1: #!/usr/bin/env python
On 2011/10/11 07:55:34, ahe wrote:
> I have assumed the changes to this file was copied verbatim from another file.
> Did you make any modifications?

Just one.  I held back on making style changes on this file to make the patch
easier to receive.

http://codereview.chromium.org/8223016/diff/1/tools/testing/test_runner.py#ne...
tools/testing/test_runner.py:23: 
On 2011/10/11 07:55:34, ahe wrote:
> Add newline.

Done.

http://codereview.chromium.org/8223016/diff/1/tools/testing/test_runner.py#ne...
tools/testing/test_runner.py:24: def _CheckedUnlink(name):
I changed this method to start with _ as an indicator it is private to this
file.

http://codereview.chromium.org/8223016/diff/1/tools/testing/test_runner.py#ne...
tools/testing/test_runner.py:29: 
On 2011/10/11 07:55:34, ahe wrote:
> Extra line.

Done.

Powered by Google App Engine
This is Rietveld 408576698