~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2006-10-16 01:25:46 UTC
  • mfrom: (2071 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2080.
  • Revision ID: john@arbash-meinel.com-20061016012546-d01a0740671b4d73
[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from bzrlib.errors import ParamikoNotPresent
28
28
from bzrlib.tests import (
29
29
                          TestCase,
30
 
                          TestCaseInTempDir,
 
30
                          TestCaseWithMemoryTransport,
31
31
                          TestCaseWithTransport,
32
32
                          TestSkipped,
33
33
                          )
66
66
        except ParamikoNotPresent:
67
67
            raise TestSkipped("Paramiko not present")
68
68
        old_transport = bzrlib.tests.default_transport
69
 
        old_root = TestCaseInTempDir.TEST_ROOT
70
 
        TestCaseInTempDir.TEST_ROOT = None
 
69
        old_root = TestCaseWithMemoryTransport.TEST_ROOT
 
70
        TestCaseWithMemoryTransport.TEST_ROOT = None
71
71
        try:
72
72
            TestOptions.current_test = "test_transport_set_to_sftp"
73
73
            stdout = self.capture('selftest --transport=sftp test_transport_set_to_sftp')
82
82
        finally:
83
83
            bzrlib.tests.default_transport = old_transport
84
84
            TestOptions.current_test = None
85
 
            TestCaseInTempDir.TEST_ROOT = old_root
 
85
            TestCaseWithMemoryTransport.TEST_ROOT = old_root
86
86
 
87
87
 
88
88
class TestRunBzr(ExternalBase):
166
166
        """bzr selftest --benchmark should not run the default test suite."""
167
167
        # We test this by passing a regression test name to --benchmark, which
168
168
        # should result in 0 rests run.
169
 
        old_root = TestCaseInTempDir.TEST_ROOT
 
169
        old_root = TestCaseWithMemoryTransport.TEST_ROOT
170
170
        try:
171
 
            TestCaseInTempDir.TEST_ROOT = None
 
171
            TestCaseWithMemoryTransport.TEST_ROOT = None
172
172
            out, err = self.run_bzr('selftest', '--benchmark', 'workingtree_implementations')
173
173
        finally:
174
 
            TestCaseInTempDir.TEST_ROOT = old_root
 
174
            TestCaseWithMemoryTransport.TEST_ROOT = old_root
175
175
        self.assertContainsRe(out, 'Ran 0 tests.*\n\nOK')
176
176
        self.assertEqual(
177
177
            'running tests...\ntests passed\n',