コード例 #1
0
ファイル: tests.py プロジェクト: thimalk/bloodhound-789
 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)
コード例 #2
0
 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)
コード例 #3
0
ファイル: tests.py プロジェクト: thimalk/bloodhound-789
 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))
コード例 #4
0
 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))