[MERGE] make init-repo use '.' as default location

Scott Scriven bzr at toykeeper.net
Sat Jul 12 17:16:26 BST 2008


* James Westby <jw+debian at jameswestby.net> wrote:
> > +        out, err = self.run_bzr('init-repository')
> > +        dir = BzrDir.open('.')
> > +        self.assertTrue(dir.open_repository())
> 
> I'm not sure whether assertTrue is the correct thing to use 

Whether it's ideal or not, it works and it's the same code the 
previous test case uses.

But... after looking at unittest.py, I can say "assertTrue" is 
misleading.  It doesn't assert(expr is True) or even
assert(expr == True).  Instead, it's equivalent to
assert(not not expr).

So, even though it works, it might be better to avoid it entirely 
to avoid confusion.  My inclination is to use it in this patch 
for consistency, then remove all uses of assertTrue later.

Any thoughts?


-- Scott



More information about the bazaar mailing list