On Mon, Mar 12, 2012 at 22:21,  <hwri...@apache.org> wrote:
>...
> +++ subversion/trunk/subversion/tests/cmdline/svntest/wc.py Tue Mar 13 
> 02:21:36 2012
> @@ -29,6 +29,7 @@ import re
>  import urllib
>  import logging
>  import pprint
> +import cStringIO as StringIO
>...
> +  o = StringIO()

I don't see how a func-call to a module can possibly work, so I'm
assuming this code was not actually tested (last minute change?). That
may also lead to my query about pprint-to-stream vs pformat.

And, FWIW, the cStringIO module is standard in Python 2.5, so there
isn't really a need to import "as StringIO" (as you'd see in various
compat-style import logic).

>...

Cheers,
-g

> +  o.write("=============================================================\n")
> +  o.write("Expected '%s' and actual '%s' in %s tree are different!\n"
> +                % (expected.name, actual.name, label))
> +  o.write("=============================================================\n")
> +  o.write("EXPECTED NODE TO BE:\n")
> +  o.write("=============================================================\n")
> +  expected.pprint(o)
> +  o.write("=============================================================\n")
> +  o.write("ACTUAL NODE FOUND:\n")
> +  o.write("=============================================================\n")
> +  actual.pprint(o)
> +
> +  logger.warn(o.getValue())
> +  o.close()
>
>  ### yanked from tree.py
>  def default_singleton_handler(description, path, item):
>   node = item_to_node(path, item)
>   logger.warn("Couldn't find node '%s' in %s tree" % (node.name, description))
> -  logger.warn(pprint.pformat(node))
> +  o = StringIO()
> +  node.pprint(o)
> +  logger.warn(o.getValue())
> +  o.close()
>   raise svntest.tree.SVNTreeUnequal
>
>

Reply via email to