52
52
file('branch/file.BASE', 'wb').write('contents')
55
self.assertEqual(len(list(iter_deletables(tree, unknown=True))), 1)
56
file('branch/file', 'wb').write('contents')
57
file('branch/file~', 'wb').write('contents')
58
file('branch/file.pyc', 'wb').write('contents')
60
dels = sorted([r for a,r in iter_deletables(tree, unknown=True)])
61
assert sorted(['file', 'file.BASE']) == dels
63
dels = [r for a,r in iter_deletables(tree, detritus=True)]
64
assert sorted(['file~', 'file.BASE']) == dels
66
dels = [r for a,r in iter_deletables(tree, ignored=True)]
67
assert sorted(['file~', 'file.pyc', '.bzrignore']) == dels
69
dels = [r for a,r in iter_deletables(tree, unknown=False)]
53
self.assertEqual(len(list(iter_deletables(tree, unknown=True))), 1)
54
file('branch/file', 'wb').write('contents')
55
file('branch/file~', 'wb').write('contents')
56
file('branch/file.pyc', 'wb').write('contents')
58
dels = sorted([r for a,r in iter_deletables(tree, unknown=True)])
59
assert sorted(['file', 'file.BASE']) == dels
61
dels = [r for a,r in iter_deletables(tree, detritus=True)]
62
assert sorted(['file~', 'file.BASE']) == dels
64
dels = [r for a,r in iter_deletables(tree, ignored=True)]
65
assert sorted(['file~', 'file.pyc', '.bzrignore']) == dels
67
dels = [r for a,r in iter_deletables(tree, unknown=False)]
75
71
return makeSuite(TestCleanTree)