~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_cleanup.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-12-23 00:59:10 UTC
  • mfrom: (4794.1.21 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20091223005910-zatr8ajlw8ul6d6s
(robertc) Add testtools 0.9.2 as a hard dependency to run the test
        suite, improving debug output on selftest --parallel,
        reducing code size and adding support for assertThat. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
        self.call_log.append('no_op_cleanup')
40
40
 
41
41
    def assertLogContains(self, regex):
42
 
        log = self._get_log(keep_log_file=True)
43
 
        self.assertContainsRe(log, regex, re.DOTALL)
 
42
        self.assertContainsRe(self.get_log(), regex, re.DOTALL)
44
43
 
45
44
    def failing_cleanup(self):
46
45
        self.call_log.append('failing_cleanup')
184
183
        self.assertRaises(ErrorA, _do_with_cleanups, cleanups,
185
184
            self.trivial_func)
186
185
        self.assertLogContains('Cleanup failed:.*ErrorB')
187
 
        log = self._get_log(keep_log_file=True)
188
 
        self.assertFalse('ErrorA' in log)
 
186
        self.assertFalse('ErrorA' in self.get_log())
189
187
 
190
188
    def make_two_failing_cleanup_funcs(self):
191
189
        def raise_a():