[Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add test report generation

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Wed Aug 13 21:32:07 UTC 2008


Dan Smith wrote:
> KR> This is odd because the code uses tabs:
> 
> The tabs aren't translating properly into the mailer, I'm sure.  I think
> it would be safer to use space-padded fields where possible.

Excellent suggestion - thanks!

> 
> KR> for type, val in rvals.iteritems():
> 
> Replacing this:
> 
> KR>         results += " %s:\t%d\n" % (type, val)
> 
> with something like this:
> 
>   results += " %s: %20d\n" % (type, val)

I think it works better to pad the string in this case; I came up with:

results += " %-10s: %d\n" % (type, val)

So the format looks like:

=================================================
  FAIL      : 6
  XFAIL     : 0
  SKIP      : 8
  PASS      : 1
  -----------------
  Total     : 15
=================================================

This lets the numbers extend to the right, but fixes the status text to 
be left aligned.  Thoughts?

Daisy - let me know how this looks in your mailer.  I can tweak it some 
more if need be.  Although, I'll probably do that in a follow up patch 
(that way we can at least get this bit of code in the tree). Thanks for 
the reviews and for testing it out!

-- 
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list