[MERGE] More than double the speed of "bzr selftest"

Alexander Belchenko bialix at ukr.net
Wed Apr 11 09:28:55 BST 2007


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

Daniel Silverstone пишет:
> On Wed, 2007-04-11 at 01:52 -0400, Martin Pool wrote:
>> +                    assert self.test_dir.endswith('/work'), 
>> self.test_dir
>> +                    shutil.rmtree(self.test_dir[:-len('/work')])
>>
>> I think it would be cleaner and simpler to just do an addCleanup from 
>> TestCaseInTempDir.makeAndChdirToTestDir.  Wouldn't that work?
> 
> Should this not be:
> 
> assert os.path.split(self.test_dir)[1] == "work", self.test_dir
> shutil.rmtree(os.path.split(self.test_dir)[0])
> 
> Or does windows use forward slashes in python for paths too?

Windows accept forward slashes [almost] without problem.
So that code is OK.

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

iD8DBQFGHJxGzYr338mxwCURArk1AJ4kEyiq6IQPxxK214f7ZQEJY1pdDQCeIPVq
l8xqxQeXHlZctKyeoLN1/lc=
=Gvc+
-----END PGP SIGNATURE-----



More information about the bazaar mailing list