Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3324)

Issue 6611050: Refactor test_pictures so we can add test_pdfs without code duplication. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by edisonn
Modified:
12 years, 1 month ago
Reviewers:
epoger, EricB
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Refactor test_pictures so we can add test_pdfs without code duplication. Committed: https://code.google.com/p/skia/source/detail?r=5878

Patch Set 1 #

Patch Set 2 : #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -96 lines) Patch
M tools/test_pictures.py View 3 chunks +10 lines, -96 lines 7 comments Download
A tools/test_rendering.py View 1 1 chunk +118 lines, -0 lines 2 comments Download

Messages

Total messages: 5
edisonn
Refactor test_pictures so we can add test_pdfs without code duplication.
12 years, 2 months ago (2012-10-05 15:50:44 UTC) #1
epoger
LGTM https://codereview.appspot.com/6611050/diff/3001/tools/test_pictures.py File tools/test_pictures.py (left): https://codereview.appspot.com/6611050/diff/3001/tools/test_pictures.py#oldcode27 tools/test_pictures.py:27: def RunCommand(command): It's probably too late now, but ...
12 years, 2 months ago (2012-10-05 19:54:13 UTC) #2
EricB
https://codereview.appspot.com/6611050/diff/3001/tools/test_pictures.py File tools/test_pictures.py (right): https://codereview.appspot.com/6611050/diff/3001/tools/test_pictures.py#newcode29 tools/test_pictures.py:29: """Parses the --mode option of the commandline. Why are ...
12 years, 1 month ago (2012-10-08 18:06:34 UTC) #3
edisonn
https://codereview.appspot.com/6611050/diff/3001/tools/test_pictures.py File tools/test_pictures.py (right): https://codereview.appspot.com/6611050/diff/3001/tools/test_pictures.py#newcode18 tools/test_pictures.py:18: import test_rendering On 2012/10/05 19:54:14, epoger wrote: > Please ...
12 years, 1 month ago (2012-10-09 13:04:43 UTC) #4
edisonn
12 years, 1 month ago (2012-10-09 13:32:49 UTC) #5
https://codereview.appspot.com/6611050/diff/3001/tools/test_pictures.py
File tools/test_pictures.py (right):

https://codereview.appspot.com/6611050/diff/3001/tools/test_pictures.py#newco...
tools/test_pictures.py:82: extra_args += ' --mode %s' % ' '.join(options.mode)
seem to work fine. I will preserve current functionality.
I don't like to mix refactoring with fixes/improvements

The parameters are passed correctly to render_pictures
dhcp-172-29-92-74:tools edisonn$ python ./test_pictures.py ./ ./ --mode pow2tile
128 128
running command [/Users/edisonn/src/skia/trunk/out/Debug/render_pictures ./
/var/folders/00/0thk0000h01000cxqpysvccm003_28/T/tmpJNZkvx --mode pow2tile 128
128]...

 

On 2012/10/05 19:54:14, epoger wrote:
> Does this work if options.mode has multiple values?  It seems to me like only
> the first one would be associated with the "--mode" flag, and the others might
> be abandoned.
> 
> Maybe use ' --mode "%s"' to put quotes around the complete list, or pass the
> arguments as a list rather than a string?  (See my comments in the other file)
> 
> Edit: I see now that this code already existed elsewhere in this file.  So
don't
> feel obligated to do much about this... might be worth checking, though.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b