~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: 2010-02-10 17:52:08 UTC
  • mfrom: (5021 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5023.
  • Revision ID: john@arbash-meinel.com-20100210175208-bubuwav4uqigu291
Merge bzr.dev 5021 to resolve NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2007 Canonical Ltd
 
1
# Copyright (C) 2006-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
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):