[patch] better progress bars for selftest, cleanup test code

John Arbash Meinel john at arbash-meinel.com
Tue Oct 31 21:25:37 GMT 2006


Martin Pool wrote:
> I did some cleanups while travelling:
> 
>  * Give tests progress bars that look like this::
> 
>   [46/3777, 10 skipped in 41s]
> test_bundle.V08BundleTester.test_last_modified
> 
>    Being able to see the full test name is much nicer IMO.
> 
>  * Test progress now also looks reasonable when run as a vim subprocess.
> 
>  * Clean up TestResult, cmd_selftest,
> 
>  * Progress bars now just truncate text if it's too long, rather than
> failing.
> 
>  * Tests should still work fine using pyunit, trial, or some other test
> runner -
>    this only changes our runner implementation.
> 
>  * While doing this I noticed the listdir tests can fail if os.listdir
>    returns files unsorted, which it may.
> 
>  * Removed some tests that were IMO too tied to the previous usage of
>    progress bars by tests.
> 
> 

Apple Mail decided that your .diff file was actually a
application/octet-stream so it isn't directly viewable in an email
reader. I'm not sure what the best fix is. I thought Apple was fine with
.diff, but I guess not.

I couldn't find any non-ascii characters...

If you are going to do:

+    def _shortened_test_description(self, test):
+        what = test.id()
+        if what.startswith('bzrlib.tests.'):
+            what = what[13:]
+        return what

It would probably be good to add:

if what.startswith('bzrlib.benchmarks.'):


Overall, though. I do really like the new test display. It makes it
clear what is being processed, how long it has been running, and what
test it is on.

So you can merge it as is, or make a couple small updates. +1 from me
regardless.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061031/866b6b0f/attachment.pgp 


More information about the bazaar mailing list