1512
1511
self.assertEqual([True], factory_called)
1515
class TestSelftestCleanOutput(TestCaseInTempDir):
1517
def test_clean_output(self):
1518
# test functionality of clean_selftest_output()
1519
self.build_tree(['test0000.tmp/', 'test0001.tmp/',
1520
'bzrlib/', 'tests/',
1521
'bzr', 'setup.py', 'test9999.tmp'])
1524
before = os.listdir(root)
1526
self.assertEquals(['bzr','bzrlib','setup.py',
1527
'test0000.tmp','test0001.tmp',
1528
'test9999.tmp','tests'],
1530
clean_selftest_output(root, quiet=True)
1531
after = os.listdir(root)
1533
self.assertEquals(['bzr','bzrlib','setup.py',
1534
'test9999.tmp','tests'],
1537
def test_clean_readonly(self):
1538
# test for delete read-only files
1539
self.build_tree(['test0000.tmp/', 'test0000.tmp/foo'])
1540
osutils.make_readonly('test0000.tmp/foo')
1542
before = os.listdir(root); before.sort()
1543
self.assertEquals(['test0000.tmp'], before)
1544
clean_selftest_output(root, quiet=True)
1545
after = os.listdir(root); after.sort()
1546
self.assertEquals([], after)
1549
1514
class TestKnownFailure(TestCase):
1551
1516
def test_known_failure(self):