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

Daniel Silverstone dsilvers at digital-scurf.org
Wed Apr 11 09:20:05 BST 2007


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?

D.

-- 
Daniel Silverstone                         http://www.digital-scurf.org/
PGP mail accepted and encouraged.            Key Id: 2BC8 4016 2068 7895





More information about the bazaar mailing list