~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/__init__.py

  • Committer: Martin Pool
  • Date: 2005-09-18 00:06:16 UTC
  • mto: (1185.8.2) (974.1.91)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: mbp@sourcefrog.net-20050918000616-edde4e14ad4aa462
- clean up imports in selftest

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import sys
23
23
import errno
24
24
import subprocess
25
 
import shutil
 
25
from cStringIO import StringIO
26
26
 
27
27
import testsweet
28
28
import bzrlib.commands
132
132
        """Call callable with redirected std io pipes.
133
133
 
134
134
        Returns the return code."""
135
 
        from StringIO import StringIO
136
135
        if not callable(a_callable):
137
136
            raise ValueError("a_callable must be callable.")
138
137
        if stdin is None:
212
211
 
213
212
    def setUp(self):
214
213
        super(TestCaseInTempDir, self).setUp()
215
 
        import os
216
214
        self._make_test_root()
217
215
        self._currentdir = os.getcwdu()
218
216
        self.test_dir = os.path.join(self.TEST_ROOT, self.id())
220
218
        os.chdir(self.test_dir)
221
219
        
222
220
    def tearDown(self):
223
 
        import os
224
221
        os.chdir(self._currentdir)
225
222
        super(TestCaseInTempDir, self).tearDown()
226
223
 
277
274
        This doesn't add anything to a branch.
278
275
        """
279
276
        # XXX: It's OK to just create them using forward slashes on windows?
280
 
        import os
281
277
        for name in shape:
282
278
            assert isinstance(name, basestring)
283
279
            if name[-1] == '/':
307
303
    import bzrlib, bzrlib.store, bzrlib.inventory, bzrlib.branch
308
304
    import bzrlib.osutils, bzrlib.commands, bzrlib.merge3, bzrlib.plugin
309
305
    from doctest import DocTestSuite
310
 
    import os
311
 
    import shutil
312
 
    import time
313
 
    import sys
314
306
 
315
307
    global MODULES_TO_TEST, MODULES_TO_DOCTEST
316
308