~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2010-02-10 00:28:39 UTC
  • mfrom: (5017 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5018.
  • Revision ID: mbp@canonical.com-20100210002839-tn92bhjk7g6bisb5
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""UI tests for the test framework."""
18
18
 
19
 
import bzrlib.transport
20
19
from bzrlib import (
21
20
    benchmarks,
22
21
    tests,
23
22
    )
24
 
from bzrlib.errors import ParamikoNotPresent
25
23
from bzrlib.tests import (
26
 
                          features,
27
 
                          TestCase,
28
 
                          TestCaseInTempDir,
29
 
                          TestSkipped,
30
 
                          )
 
24
    features,
 
25
    stub_sftp,
 
26
    )
31
27
 
32
28
 
33
29
class SelfTestPatch:
51
47
            tests.selftest = original_selftest
52
48
 
53
49
 
54
 
class TestOptionsWritingToDisk(TestCaseInTempDir, SelfTestPatch):
 
50
class TestOptionsWritingToDisk(tests.TestCaseInTempDir, SelfTestPatch):
55
51
 
56
52
    def test_benchmark_runs_benchmark_tests(self):
57
53
        """selftest --benchmark should change the suite factory."""
69
65
        self.assertEqual(0, len(lines))
70
66
 
71
67
 
72
 
class TestOptions(TestCase, SelfTestPatch):
 
68
class TestOptions(tests.TestCase, SelfTestPatch):
73
69
 
74
70
    def test_load_list(self):
75
71
        params = self.get_params_passed_to_core('selftest --load-list foo')
80
76
        # version.
81
77
        self.requireFeature(features.paramiko)
82
78
        params = self.get_params_passed_to_core('selftest --transport=sftp')
83
 
        self.assertEqual(bzrlib.transport.sftp.SFTPAbsoluteServer,
 
79
        self.assertEqual(stub_sftp.SFTPAbsoluteServer,
84
80
            params[1]["transport"])
85
81
 
86
82
    def test_transport_set_to_memory(self):