本文整理汇总了Python中ossimsetupconfig.AVOssimSetupConfigHandler.make_backup方法的典型用法代码示例。如果您正苦于以下问题:Python AVOssimSetupConfigHandler.make_backup方法的具体用法?Python AVOssimSetupConfigHandler.make_backup怎么用?Python AVOssimSetupConfigHandler.make_backup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimsetupconfig.AVOssimSetupConfigHandler
的用法示例。
在下文中一共展示了AVOssimSetupConfigHandler.make_backup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_make_backup
# 需要导入模块: from ossimsetupconfig import AVOssimSetupConfigHandler [as 别名]
# 或者: from ossimsetupconfig.AVOssimSetupConfigHandler import make_backup [as 别名]
def test_make_backup(self):
if os.path.isdir(BACKUP_FOLDER):
config = AVOssimSetupConfigHandler(TEST_FILES_PATH+"ossim_setup1.conf")
config.make_backup()
#check that there is almost on backup file
backup_filter = "%s%s*"% (BACKUP_FOLDER,"ossim_setup1.conf")
backup_files = glob.glob(backup_filter)
nbackupfiles = len(backup_files)
self.assertTrue(nbackupfiles>0)#Almost one file
self.assertTrue(nbackupfiles<6)#no more than 5 files
else:
print "make backup tests couldn't be executed. %s not exists!" % BACKUP_FOLDER