def test_multiple_backup_creates_new_files(self): """Checks that, for a small finite number of backups, multiple backups do not overwrite old backups. The limit is effectively 65""" orig = self.original.name backups = [backupfile(orig) for i in range(65)] unique_set = set([orig, ] + backups) self.assertEqual(len(unique_set), 66)
def test_backup_creates_new_file(self): """Checks that a new file is created""" orig = self.original.name new = backupfile(orig) self.assertNotEqual(orig, new) self.assert_(os.path.exists(orig)) self.assert_(os.path.exists(new))