当前位置: 首页>>代码示例>>Python>>正文


Python SANSUtility.create_zero_error_free_workspace方法代码示例

本文整理汇总了Python中SANSUtility.create_zero_error_free_workspace方法的典型用法代码示例。如果您正苦于以下问题:Python SANSUtility.create_zero_error_free_workspace方法的具体用法?Python SANSUtility.create_zero_error_free_workspace怎么用?Python SANSUtility.create_zero_error_free_workspace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SANSUtility的用法示例。


在下文中一共展示了SANSUtility.create_zero_error_free_workspace方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_that_non_existent_ws_creates_error_message

# 需要导入模块: import SANSUtility [as 别名]
# 或者: from SANSUtility import create_zero_error_free_workspace [as 别名]
 def test_that_non_existent_ws_creates_error_message(self):
     # Arrange
     ws_name = 'original'
     ws_clone_name = 'clone'
     # Act
     message, complete = su.create_zero_error_free_workspace(input_workspace_name = ws_name, output_workspace_name = ws_clone_name)
     # Assert
     message.strip()
     self.assertTrue(message)
     self.assertTrue(not complete)
开发者ID:,项目名称:,代码行数:12,代码来源:

示例2: test_that_bad_zero_error_removal_creates_error_message

# 需要导入模块: import SANSUtility [as 别名]
# 或者: from SANSUtility import create_zero_error_free_workspace [as 别名]
    def test_that_bad_zero_error_removal_creates_error_message(self):
        # Arrange
        ws_name = 'original'
        ws_clone_name = 'clone'
        self._setup_workspace(ws_name, 'Event')
        # Act
        message, complete= su.create_zero_error_free_workspace(input_workspace_name = ws_name, output_workspace_name = ws_clone_name)
        # Assert
        message.strip()
        self.assertTrue(message)
        self.assertTrue(not ws_clone_name in mtd)
        self.assertTrue(not complete)

        self._removeWorkspace(ws_name)
        self.assertTrue(not ws_name in mtd)
开发者ID:,项目名称:,代码行数:17,代码来源:

示例3: test_that_zeros_are_removed_correctly

# 需要导入模块: import SANSUtility [as 别名]
# 或者: from SANSUtility import create_zero_error_free_workspace [as 别名]
    def test_that_zeros_are_removed_correctly(self):
        # Arrange
        ws_name = 'original'
        ws_clone_name = 'clone'
        self._setup_workspace(ws_name, 'Histogram')
        # Act
        message, complete = su.create_zero_error_free_workspace(input_workspace_name = ws_name, output_workspace_name = ws_clone_name)
        # Assert
        message.strip()
        print message
       # self.assertTrue(not message)
        #self.assertTrue(complete)
        self.assertTrue(mtd[ws_name] != mtd[ws_clone_name])

        self._removeWorkspace(ws_name)
        self._removeWorkspace(ws_clone_name)
        self.assertTrue(not ws_name in mtd)
        self.assertTrue(not ws_clone_name in mtd)
开发者ID:,项目名称:,代码行数:20,代码来源:

示例4: get_mapped_workspaces

# 需要导入模块: import SANSUtility [as 别名]
# 或者: from SANSUtility import create_zero_error_free_workspace [as 别名]
def get_mapped_workspaces(save_names, save_as_zero_error_free):
    """
        Get a workspace name map, which maps from the original
        workspace to a zero-error-free cloned workspace if
        save_as_zero_error_free is checked otherwise the
        workspaces are mapped to themselves.
        @param save_names: a list of workspace names
        @param save_as_zero_error_free : if the user wants the zero-errors removed
        @returns a map of workspaces
    """
    workspace_dictionary = {}
    for name in save_names:
        if save_as_zero_error_free:
            cloned_name = name + '_cloned_temp'
            dummy_message, complete = su.create_zero_error_free_workspace(input_workspace_name = name, output_workspace_name = cloned_name)
            if complete:
                workspace_dictionary[name] = cloned_name
            else:
                workspace_dictionary[name] = name
        else:
            workspace_dictionary[name] = name
    return workspace_dictionary
开发者ID:mantidproject,项目名称:mantid,代码行数:24,代码来源:SANSBatchMode.py


注:本文中的SANSUtility.create_zero_error_free_workspace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。