~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/bash_completion/tests/test_bashcomp.py

(vila) Mark test failures on windows as KnownFailures pending investigation.
 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
 
17
import sys
 
18
 
17
19
import bzrlib
18
20
from bzrlib import commands, tests
19
21
from bzrlib.tests import features
27
29
    """Component for testing execution of a bash completion script."""
28
30
 
29
31
    _test_needs_features = [features.bash_feature]
 
32
    script = None
30
33
 
31
34
    def complete(self, words, cword=-1):
32
35
        """Perform a bash completion.
95
98
class TestBashCompletion(tests.TestCase, BashCompletionMixin):
96
99
    """Test bash completions that don't execute bzr."""
97
100
 
98
 
    def __init__(self, methodName='testMethod'):
99
 
        super(TestBashCompletion, self).__init__(methodName)
100
 
        self.script = None
101
 
 
102
101
    def test_simple_scipt(self):
103
102
        """Ensure that the test harness works as expected"""
104
103
        self.script = """
155
154
    will be replaced by the bzr instance running this selftest.
156
155
    """
157
156
 
158
 
    def __init__(self, methodName='testMethod'):
159
 
        super(TestBashCompletionInvoking, self).__init__(methodName)
160
 
        self.script = None
 
157
    def setUp(self):
 
158
        super(TestBashCompletionInvoking, self).setUp()
 
159
        if sys.platform == 'win32':
 
160
            raise tests.KnownFailure(
 
161
                'see bug #709104, completion is broken on windows')
161
162
 
162
163
    def get_script(self):
163
164
        s = super(TestBashCompletionInvoking, self).get_script()