~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

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