[MERGE] several tweaks for formatting selftest output

Alexander Belchenko bialix at ukr.net
Wed Dec 13 07:46:05 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Arbash Meinel пишет:
> Alexander Belchenko wrote:
>> Here the patch.
> 
> v- I would probably prefer:
> 
> self.stream.write(self._ellipsize_to_right(name,
>                   osutils.terminal_width()-20))
> 
> It is a small thing, but as long as the terminal_width() overhead is
> small, it does mean that you can change the width of the terminal and
> have the lines get wider/smaller. It is something that I kind of like
> with selftest --verbose.

Agree.

> @@ -386,7 +388,7 @@
> 
>      def report_failure(self, test, err):
>          self.failure_count += 1
> -        self.stream.writeln('FAIL %s\n    %s'
> +        self.stream.writeln(' FAIL %s\n    %s'
>                  % (self._testTimeString(), err[1]))
> 
>      def report_success(self, test):
> 
> ^ Why are you changing FAIL? Is it just to line up with ERROR and SKIP?
> It seems good, I just haven't seen it mentioned. (Maybe I just missed it).

Because FAIL was not properly aligned in the field of 5-chars width.
Martin accidentally broke this when he refactoring this code.
And therefore output looks ugly:

test_bundle.V08BundleTester.test_symlink_bundle              SKIP           9ms
test_diff.TestDiff.test_external_diff_binary_lang_c         ERROR         360ms
test_lockdir.TestLockDir.test_34_lock_write_waits              OK        1072ms
test_lockdir.TestLockDir.test_35_wait_lock_changing         FAIL         140ms

> 
> Otherwise +1.

Alexander

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFf6+9zYr338mxwCURAg6vAJ46SOotrtem5qF0mvAdS3pVVQWGMwCdHLze
L35r93htx2Ri7ozYToLHX1c=
=eV6v
-----END PGP SIGNATURE-----





More information about the bazaar mailing list