~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_clean_tree.py

  • Committer: John Arbash Meinel
  • Date: 2011-05-11 11:35:28 UTC
  • mto: This revision was merged to the branch mainline in revision 5851.
  • Revision ID: john@arbash-meinel.com-20110511113528-qepibuwxicjrbb2h
Break compatibility with python <2.6.

This includes auditing the code for places where we were doing
explicit 'sys.version' checks and removing them as appropriate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2009, 2010, 2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
18
18
import errno
19
19
import os
20
20
import shutil
21
 
from StringIO import StringIO
22
21
import sys
23
22
import types
24
23
 
47
46
        BzrDir.create_standalone_workingtree('branch')
48
47
        os.symlink(os.path.realpath('no-die-please'), 'branch/die-please')
49
48
        os.mkdir('no-die-please')
50
 
        self.failUnlessExists('branch/die-please')
 
49
        self.assertPathExists('branch/die-please')
51
50
        os.mkdir('no-die-please/child')
52
51
 
53
52
        clean_tree('branch', unknown=True, no_prompt=True)
54
 
        self.failUnlessExists('no-die-please')
55
 
        self.failUnlessExists('no-die-please/child')
 
53
        self.assertPathExists('no-die-please')
 
54
        self.assertPathExists('no-die-please/child')
56
55
 
57
56
    def test_iter_deletable(self):
58
57
        """Files are selected for deletion appropriately"""