~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-09 14:21:13 UTC
  • mfrom: (5016.1.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100209142113-o8yqxlo2kqgp98q0
(vila) Merge 2.1 branch including fix for #516183) and fix 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):