/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_clean_tree.py

  • Committer: Aaron Bentley
  • Date: 2009-03-09 04:36:37 UTC
  • mto: This revision was merged to the branch mainline in revision 4100.
  • Revision ID: aaron@aaronbentley.com-20090309043637-5aftkw7f2yyvcn13
Fix some formatting issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
 
18
18
import os
42
42
        BzrDir.create_standalone_workingtree('branch')
43
43
        os.symlink(os.path.realpath('no-die-please'), 'branch/die-please')
44
44
        os.mkdir('no-die-please')
45
 
        self.failUnlessExists('branch/die-please')
 
45
        assert os.path.exists('branch/die-please')
46
46
        os.mkdir('no-die-please/child')
47
47
 
48
48
        clean_tree('branch', unknown=True, no_prompt=True)
49
 
        self.failUnlessExists('no-die-please')
50
 
        self.failUnlessExists('no-die-please/child')
 
49
        assert os.path.exists('no-die-please')
 
50
        assert os.path.exists('no-die-please/child')
51
51
 
52
52
    def test_iter_deletable(self):
53
53
        """Files are selected for deletion appropriately"""
63
63
            transport.put_bytes('file~', 'contents')
64
64
            transport.put_bytes('file.pyc', 'contents')
65
65
            dels = sorted([r for a,r in iter_deletables(tree, unknown=True)])
66
 
            self.assertEqual(['file', 'file.BASE'], dels)
 
66
            assert sorted(['file', 'file.BASE']) == dels
67
67
 
68
68
            dels = [r for a,r in iter_deletables(tree, detritus=True)]
69
 
            self.assertEqual(sorted(['file~', 'file.BASE']), dels)
 
69
            assert sorted(['file~', 'file.BASE']) == dels
70
70
 
71
71
            dels = [r for a,r in iter_deletables(tree, ignored=True)]
72
 
            self.assertEqual(sorted(['file~', 'file.pyc', '.bzrignore']),
73
 
                             dels)
 
72
            assert sorted(['file~', 'file.pyc', '.bzrignore']) == dels
74
73
 
75
74
            dels = [r for a,r in iter_deletables(tree, unknown=False)]
76
 
            self.assertEqual([], dels)
 
75
            assert [] == dels
77
76
        finally:
78
77
            tree.unlock()