~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_trace.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-09-23 21:08:26 UTC
  • mfrom: (2849.1.1 index)
  • Revision ID: pqm@pqm.ubuntu.com-20070923210826-t3ymvo1l68z96in1
(robertc) Tweak index -Devil tracing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
from bzrlib.trace import (
31
31
    mutter, mutter_callsite, report_exception,
32
32
    set_verbosity_level, get_verbosity_level, is_quiet, is_verbose, be_quiet,
33
 
    _rollover_trace_maybe,
34
33
    )
35
34
 
36
35
 
175
174
        self.assertEqual(-1, get_verbosity_level())
176
175
        be_quiet(False)
177
176
        self.assertEqual(0, get_verbosity_level())
178
 
 
179
 
 
180
 
class TestBzrLog(TestCaseInTempDir):
181
 
 
182
 
    def test_log_rollover(self):
183
 
        temp_log_name = 'test-log'
184
 
        trace_file = open(temp_log_name, 'at')
185
 
        trace_file.write('test_log_rollover padding\n' * 1000000)
186
 
        trace_file.close()
187
 
        _rollover_trace_maybe(temp_log_name)
188
 
        # should have been rolled over
189
 
        self.assertFalse(os.access(temp_log_name, os.R_OK))