本文整理汇总了Python中SANSUtility.delete_zero_error_free_workspace方法的典型用法代码示例。如果您正苦于以下问题:Python SANSUtility.delete_zero_error_free_workspace方法的具体用法?Python SANSUtility.delete_zero_error_free_workspace怎么用?Python SANSUtility.delete_zero_error_free_workspace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SANSUtility
的用法示例。
在下文中一共展示了SANSUtility.delete_zero_error_free_workspace方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: delete_cloned_workspaces
# 需要导入模块: import SANSUtility [as 别名]
# 或者: from SANSUtility import delete_zero_error_free_workspace [as 别名]
def delete_cloned_workspaces(save_names_dict):
"""
If there are cloned workspaces in the worksapce map, then they are deleted
@param save_names_dict: a workspace name map
"""
to_delete =[]
for key in save_names_dict:
if key != save_names_dict[key]:
to_delete.append(save_names_dict[key])
for element in to_delete:
su.delete_zero_error_free_workspace(input_workspace_name = element)
示例2: test_that_deletion_of_non_existent_ws_creates_error_message
# 需要导入模块: import SANSUtility [as 别名]
# 或者: from SANSUtility import delete_zero_error_free_workspace [as 别名]
def test_that_deletion_of_non_existent_ws_creates_error_message(self):
# Arrange
ws_name = 'ws'
# Act
message, complete = su.delete_zero_error_free_workspace(input_workspace_name = ws_name)
# Assert
message.strip()
self.assertTrue(message)
self.assertTrue(not complete)
示例3: test_that_deletion_of_extent_ws_is_successful
# 需要导入模块: import SANSUtility [as 别名]
# 或者: from SANSUtility import delete_zero_error_free_workspace [as 别名]
def test_that_deletion_of_extent_ws_is_successful(self):
# Arrange
ws_name = 'ws'
self._setup_workspace(ws_name, 'Histogram')
# Act + Assert
self.assertTrue(ws_name in mtd)
message, complete = su.delete_zero_error_free_workspace(input_workspace_name = ws_name)
message.strip()
self.assertTrue(not message)
self.assertTrue(complete)
self.assertTrue(not ws_name in mtd)