[merge][0.11][critical] test log problems

John Arbash Meinel john at arbash-meinel.com
Sun Sep 24 19:43:13 BST 2006


Aaron Bentley wrote:
> John Arbash Meinel wrote:
>>> I expanded on this with some test cases, since Carl didn't have time
>>> right now.
> 
>>> === modified file bzrlib/tests/__init__.py
>>> --- bzrlib/tests/__init__.py
>>> +++ bzrlib/tests/__init__.py
>>> @@ -244,8 +244,8 @@
>>>          unittest.TestResult.addError(self, test, err)
>>>          # We can only do this if we have one of our TestCases, not if
>>>          # we have a doctest.
>>> -        setKeepLogFile = getattr(test, 'setKeepLogFile', None)
>>> -        if setKeepLogFile is not None:
>>> +        setKeepLogfile = getattr(test, 'setKeepLogfile', None)
>>> +        if setKeepLogfile is not None:
>>>              setKeepLogfile()
> 
> For later, it might make sense to delete the log on success, instead of
> keeping it on failure/error.

Makes sense to me.

> 
>>> +
>>> +        log = test._get_log()
>>> +        self.assertContainsRe(log, 'this will be kept')
>>> +        self.assertEqual(log, test._log_contents)
>>>  
>>>  class TestTestCase(TestCase):
>>>      """Tests that test the core bzrlib TestCase."""
> 
> PEP8 requires another newline, I think.  Otherwise, +1.
> 
> Aaron

Thanks for the catch. I'll fix and submit.

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/20060924/180baecd/attachment.pgp 


More information about the bazaar mailing list