/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_debug.py

  • Committer: Martin Pool
  • Date: 2007-08-20 05:53:39 UTC
  • mfrom: (2727 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2730.
  • Revision ID: mbp@sourcefrog.net-20070820055339-uzei7f7i7jo6tugg
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
import signal
21
 
import subprocess
22
21
import sys
23
22
import time
24
23
 
25
 
from bzrlib.tests import TestCase, TestSkipped
 
24
from bzrlib.tests import TestCaseInTempDir, TestSkipped
26
25
 
27
 
class TestDebugOption(TestCase):
 
26
class TestDebugOption(TestCaseInTempDir):
28
27
 
29
28
    def test_dash_derror(self):
30
29
        """With -Derror, tracebacks are shown even for user errors"""
31
 
        out, err = self.run_bzr("-Derror", "branch", "nonexistent-location",
32
 
                retcode=3)
 
30
        out, err = self.run_bzr("-Derror branch nonexistent-location",
 
31
                                retcode=3)
33
32
        # error output should contain a traceback; we used to look for code in
34
33
        # here but it may be missing if the source is not in sync with the
35
34
        # pyc file.
36
35
        self.assertContainsRe(err, "Traceback \\(most recent call last\\)")
 
36
 
 
37
    def test_dash_dlock(self):
 
38
        # With -Dlock, locking and unlocking is recorded into the log
 
39
        self.run_bzr("-Dlock init foo")
 
40
        trace_messages = self._get_log(keep_log_file=True)
 
41
        self.assertContainsRe(trace_messages, "lock_write")