253
253
# If _open_bzr_log cannot open the file, then we should write the
254
254
# warning to stderr. Since this is normally happening before logging is
258
257
# Set the log file to something that cannot exist
259
260
os.environ['BZR_LOG'] = os.getcwd() + '/no-dir/bzr.log'
261
262
logf = trace._open_bzr_log()
262
263
self.assertIs(None, logf)
263
264
self.assertContainsRe(sys.stderr.getvalue(),
264
265
'failed to open trace file: .*/no-dir/bzr.log')
266
268
class TestVerbosityLevel(TestCase):
268
270
def test_verbosity_level(self):