[PATCH] Small fixes to TestCaseWithMemoryTransport

Wouter van Heyst larstiq at larstiq.dyndns.org
Wed Jan 10 18:32:09 GMT 2007


On Wed, Jan 10, 2007 at 05:25:20PM +0100, Vincent Ladeuil wrote:
> There was a little bit of inconsistency with the failIfExists and
> failUnlessExists methods: they were testing the existence of the
> file on disk.
> 
> I defined failUnlessExistsOnDisk and failIfExistsOnDisk for that
> and pushed down the existing ones into TestCaseInTempDir.
> 
>     Vincent
> 

> # Bazaar revision bundle v0.8
> #
> # message:
> #   Small fixes to test suite in the hope that it will facilitate the
> #   adoption of TestCaseWithMemoryTransport.
> #   
> #   * bzrlib/tests/test_selftest.py:
> #   (TestTestCaseWithMemoryTransport.test_make_branch_and_memory_tree,
> #   TestTestCaseWithMemoryTransport.test_make_branch_and_memory_tree_with_format)):
> #   Ensures that MemoryTransport is not leaking.
> #   
> #   * bzrlib/tests/__init__.py:
> #   (TestCaseWithMemoryTransport.failUnlessExistsOnDisk,
> #   TestCaseWithMemoryTransport.failIfExistsOnDisk): Renamed from
> #   failUnlessExists and failIfExists which should remain targeted at
> #   testing that a file do not exists in the context of the transport
> #   specific test.
> #   (TestCaseInTempDir.failUnlessExists,
> #   TestCaseInTempDir.failIfExists): Lazily maintain compatibility
> #   with existing tests: assumes that we work in the current directory
> #   *on disk*.
> #   
> # committer: v.ladeuil+lp at free.fr
> # date: Wed 2007-01-10 17:11:34.872999907 +0100

After reading the code I was a bit confused, it took rereading the
commit log to figure out what you intended to with this. Perhaps not as
much of a problem when using the api instead of reading this diff, but
the two docstrings don't help me differentiate the bevahiour.

Other than that, a +1 from me. Changes to the testsuite like this I
won't really object against this week. While the testsuite is an asset, 
chances are rather slim of regressing 0.14 for actual use. 

Wouter van Heyst
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070110/07e20a0a/attachment.pgp 


More information about the bazaar mailing list