~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testlog.py

  • Committer: Martin Pool
  • Date: 2005-08-25 09:17:19 UTC
  • Revision ID: mbp@sourcefrog.net-20050825091719-b2d7be7bf56bb35a
- fix a few errors in new merge code

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
import os
18
 
from cStringIO import StringIO
19
18
 
20
 
from bzrlib.selftest import BzrTestBase, InTempDir
 
19
from bzrlib.selftest import BzrTestBase
21
20
from bzrlib.log import LogFormatter, show_log, LongLogFormatter
22
21
from bzrlib.branch import Branch
23
22
 
48
47
        self.logs.append(le)
49
48
 
50
49
 
51
 
class SimpleLogTest(InTempDir):
 
50
class SimpleLogTest(BzrTestBase):
52
51
 
53
52
    def checkDelta(self, delta, **kw):
54
53
        """Check the filenames touched by a delta are as expected."""
89
88
        self.build_tree(['hello'])
90
89
        b.add('hello')
91
90
        b.commit('add one file')
92
 
 
93
 
        lf = StringIO()
94
91
        # log using regular thing
95
 
        show_log(b, LongLogFormatter(lf))
96
 
        lf.seek(0)
97
 
        for l in lf.readlines():
98
 
            self.log(l)
 
92
        show_log(b, LongLogFormatter(self.TEST_LOG))
99
93
 
100
94
        # get log as data structure
101
95
        lf = LogCatcher()