~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_clean_tree.py

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:56:05 UTC
  • mfrom: (6615.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201195605-o7rl92wf6uyum3fk
(vila) Open trunk again as 2.8b1 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import os
20
20
import shutil
21
21
import sys
22
 
import types
23
22
 
24
23
from bzrlib import tests, ui
25
 
from bzrlib.bzrdir import (
26
 
    BzrDir,
 
24
from bzrlib.controldir import (
 
25
    ControlDir,
27
26
    )
28
27
from bzrlib.clean_tree import (
29
28
    clean_tree,
43
42
        if has_symlinks() is False:
44
43
            return
45
44
        os.mkdir('branch')
46
 
        BzrDir.create_standalone_workingtree('branch')
 
45
        ControlDir.create_standalone_workingtree('branch')
47
46
        os.symlink(os.path.realpath('no-die-please'), 'branch/die-please')
48
47
        os.mkdir('no-die-please')
49
48
        self.assertPathExists('branch/die-please')
56
55
    def test_iter_deletable(self):
57
56
        """Files are selected for deletion appropriately"""
58
57
        os.mkdir('branch')
59
 
        tree = BzrDir.create_standalone_workingtree('branch')
 
58
        tree = ControlDir.create_standalone_workingtree('branch')
60
59
        transport = tree.bzrdir.root_transport
61
60
        transport.put_bytes('.bzrignore', '*~\n*.pyc\n.bzrignore\n')
62
61
        transport.put_bytes('file.BASE', 'contents')
122
121
        stderr = tests.StringIOWrapper()
123
122
        ui.ui_factory = tests.TestUIFactory(stdout=stdout, stderr=stderr)
124
123
 
125
 
        BzrDir.create_standalone_workingtree('.')
 
124
        ControlDir.create_standalone_workingtree('.')
126
125
        self.build_tree(['0foo', '1bar', '2baz', 'subdir0/'])
127
126
        clean_tree('.', unknown=True, no_prompt=True)
128
127
        self.assertContainsRe(stderr.getvalue(),