~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: 2015-12-17 18:39:00 UTC
  • mfrom: (6606.1.2 fix-float)
  • Revision ID: pqm@pqm.ubuntu.com-20151217183900-0719du2uv1kwu3lc
(vila) Inline testtools private method to fix an issue in xenial (the
 private implementation has changed in an backward incompatible way).
 (Jelmer Vernooij)

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(),