~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: 2009-12-22 18:18:20 UTC
  • mfrom: (4913.2.26 2.1.0rc1-module-available)
  • Revision ID: pqm@pqm.ubuntu.com-20091222181820-qfolh2sy2nevoxxj
(jam) Switch many test features over to ModuleAvailable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    )
24
24
from bzrlib.errors import ParamikoNotPresent
25
25
from bzrlib.tests import (
26
 
                          SubUnitFeature,
 
26
                          features,
27
27
                          TestCase,
28
28
                          TestCaseInTempDir,
29
29
                          TestSkipped,
78
78
    def test_transport_set_to_sftp(self):
79
79
        # Test that we can pass a transport to the selftest core - sftp
80
80
        # version.
81
 
        try:
82
 
            import bzrlib.transport.sftp
83
 
        except ParamikoNotPresent:
84
 
            raise TestSkipped("Paramiko not present")
 
81
        self.requireFeature(features.paramiko)
85
82
        params = self.get_params_passed_to_core('selftest --transport=sftp')
86
83
        self.assertEqual(bzrlib.transport.sftp.SFTPAbsoluteServer,
87
84
            params[1]["transport"])
116
113
        self.assertEqual(['foo', 'bar'], params[1]['starting_with'])
117
114
 
118
115
    def test_subunit(self):
119
 
        self.requireFeature(SubUnitFeature)
 
116
        self.requireFeature(features.subunit)
120
117
        params = self.get_params_passed_to_core('selftest --subunit')
121
118
        self.assertEqual(tests.SubUnitBzrRunner, params[1]['runner_class'])
122
119