~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: Vincent Ladeuil
  • Date: 2008-08-26 08:25:27 UTC
  • mto: (3668.1.1 trunk) (3703.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 3669.
  • Revision ID: v.ladeuil+lp@free.fr-20080826082527-109yyxzc0u24oeel
Fix all calls to tempfile.mkdtemp to osutils.mkdtemp.

* bzrlib/transform.py:
(TransformPreview.__init__): Use osutils.mkdtemp instead of
tempfile.mkdtemp.

* bzrlib/tests/test_whitebox.py:
(MoreTests.test_relpath): Use osutils.mkdtemp instead of
tempfile.mkdtemp.

* bzrlib/tests/test_setup.py:
(TestSetup.test_build_and_install): Use osutils.mkdtemp instead of
tempfile.mkdtemp.

* bzrlib/tests/test_bundle.py:
(BundleTester.get_checkout): Use osutils.mkdtemp instead of
tempfile.mkdtemp.

* bzrlib/tests/blackbox/test_outside_wt.py:
(TestOutsideWT.test_cwd_log,
TestOutsideWT.test_diff_outside_tree): Use osutils.mkdtemp instead
of tempfile.mkdtemp.

* bzrlib/smart/repository.py:
(SmartServerRepositoryTarball._copy_to_tempdir): Use
osutils.mkdtemp instead of tempfile.mkdtemp.
(SmartServerRepositoryTarball._tarfile_response): Line too long.

* bzrlib/remote.py:
(RemoteRepository._copy_repository_tarball): Use osutils.mkdtemp
instead of tempfile.mkdtemp.

* bzrlib/osutils.py:
(_mac_mkdtemp): Add docstring.

* bzrlib/mail_client.py:
(ExternalMailClient.compose): Use osutils.mkdtemp instead of
tempfile.mkdtemp.

* bzrlib/diff.py:
(DiffFromTool.__init__): Use osutils.mkdtemp instead of
tempfile.mkdtemp.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
from cStringIO import StringIO
18
18
import os
19
19
import sys
20
 
import tempfile
21
20
 
22
21
from bzrlib import (
23
22
    bzrdir,
24
23
    errors,
25
24
    inventory,
 
25
    osutils,
26
26
    repository,
27
27
    revision as _mod_revision,
28
28
    treebuilder,
455
455
        """
456
456
 
457
457
        if checkout_dir is None:
458
 
            checkout_dir = tempfile.mkdtemp(prefix='test-branch-', dir='.')
 
458
            checkout_dir = osutils.mkdtemp(prefix='test-branch-', dir='.')
459
459
        else:
460
460
            if not os.path.exists(checkout_dir):
461
461
                os.mkdir(checkout_dir)