/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Martin von Gagern
  • Date: 2010-04-30 17:59:50 UTC
  • mto: This revision was merged to the branch mainline in revision 5240.
  • Revision ID: martin.vgagern@gmx.net-20100430175950-0qzt4uta0d4jjz6h
Import modules in tests, not classes or functions.

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
 
from bzrlib.tests import TestCase, TestCaseWithTransport, Feature
18
 
from bzrlib import commands
19
 
from StringIO import StringIO
20
 
from ..bashcomp import *
21
17
import bzrlib
 
18
from bzrlib import commands, tests
 
19
from bzrlib.plugins.bash_completion.bashcomp import *
 
20
 
22
21
import os
23
22
import subprocess
24
 
 
25
 
 
26
 
class _BashFeature(Feature):
 
23
from StringIO import StringIO
 
24
 
 
25
 
 
26
class _BashFeature(tests.Feature):
27
27
    """Feature testing whether a bash executable is available."""
28
28
 
29
29
    bash_paths = ['/bin/bash', '/usr/bin/bash']
112
112
        return out.getvalue()
113
113
 
114
114
 
115
 
class TestBashCompletion(TestCase, BashCompletionMixin):
 
115
class TestBashCompletion(tests.TestCase, BashCompletionMixin):
116
116
    """Test bash completions that don't execute bzr."""
117
117
 
118
118
    def __init__(self, methodName='testMethod'):
168
168
                          cword=4, contains=['2a'], omits=['1.9'])
169
169
 
170
170
 
171
 
class TestBashCompletionInvoking(TestCaseWithTransport, BashCompletionMixin):
 
171
class TestBashCompletionInvoking(tests.TestCaseWithTransport,
 
172
                                 BashCompletionMixin):
172
173
    """Test bash completions that might execute bzr.
173
174
 
174
175
    Only the syntax ``$(bzr ...`` is supported so far. The bzr command
204
205
                      expect=['tag1', 'tag2'])
205
206
 
206
207
 
207
 
class TestBashCodeGen(TestCase):
 
208
class TestBashCodeGen(tests.TestCase):
208
209
 
209
210
    def test_command_names(self):
210
211
        data = CompletionData()
279
280
''', cg.command_case(cmd))
280
281
 
281
282
 
282
 
class TestDataCollector(TestCase):
 
283
class TestDataCollector(tests.TestCase):
283
284
 
284
285
    def setUp(self):
285
286
        super(TestDataCollector, self).setUp()