def testAddConfigFile(self):
     # Tests adding a config file
     strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
     edConfiguration = EDConfiguration()
     edConfiguration.addConfigurationFile(strPath)
     # Load the config file again, this time the cache should be used
     edConfiguration.addConfigurationFile(strPath)
示例#2
0
 def testAddConfigFile(self):
     # Tests adding a config file
     strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
     edConfiguration = EDConfiguration()
     edConfiguration.addConfigurationFile(strPath)
     # Load the config file again, this time the cache should be used
     edConfiguration.addConfigurationFile(strPath)
示例#3
0
 def testGetXSConfigurationItem1(self):
     strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
     edConfiguration = EDConfiguration()
     edConfiguration.addConfigurationFile(strPath)
     xsDataPluginItem = edConfiguration.getXSConfigurationItem(
         "indexingMosflm")
     EDAssert.equal(True, xsDataPluginItem is not None,
                    "Obtanied configuration for indexingMosflm")
示例#4
0
 def testGetPluginListSize(self):
     """
     Testing the retrieved XSPluginList size from configuration
     """
     strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
     edConfiguration = EDConfiguration()
     edConfiguration.addConfigurationFile(strPath)
     iPluginListSize = edConfiguration.getPluginListSize()
     EDAssert.equal(1, iPluginListSize)
 def testGetPluginListSize(self):
     """
     Testing the retrieved XSPluginList size from configuration
     """
     strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
     edConfiguration = EDConfiguration()
     edConfiguration.addConfigurationFile(strPath)
     iPluginListSize = edConfiguration.getPluginListSize()
     EDAssert.equal(1, iPluginListSize)
 def testGetParamItem(self):
     """
     Testing the XSParamItem inside an XSPluginItem
     """
     strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
     edConfiguration = EDConfiguration()
     edConfiguration.addConfigurationFile(strPath)
     strValue = edConfiguration.getStringValue("indexingMosflm", "workingDir")
     EDAssert.equal("/path/to/working/dir", strValue)
 def testGetPluginItemError(self):
     """
     Testing the retrieval of an absent plugin
     """
     strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
     edConfiguration = EDConfiguration()
     edConfiguration.addConfigurationFile(strPath)
     xsPluginItem = edConfiguration.getXSConfigurationItem("toto")
     EDAssert.equal(None, xsPluginItem, "Non-existing configuration item should be None")
示例#8
0
 def testGetParamItem(self):
     """
     Testing the XSParamItem inside an XSPluginItem
     """
     strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
     edConfiguration = EDConfiguration()
     edConfiguration.addConfigurationFile(strPath)
     strValue = edConfiguration.getStringValue("indexingMosflm",
                                               "workingDir")
     EDAssert.equal("/path/to/working/dir", strValue)
示例#9
0
 def testGetPluginItemError(self):
     """
     Testing the retrieval of an absent plugin
     """
     strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
     edConfiguration = EDConfiguration()
     edConfiguration.addConfigurationFile(strPath)
     xsPluginItem = edConfiguration.getXSConfigurationItem("toto")
     EDAssert.equal(None, xsPluginItem,
                    "Non-existing configuration item should be None")
示例#10
0
 def testGetParamValue(self):
     """
     Testing the XSParamItem Value convertion from string to different formats
     """
     strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
     edConfiguration = EDConfiguration()
     edConfiguration.addConfigurationFile(strPath)
     xsPluginItem = edConfiguration.getXSConfigurationItem("indexingMosflm")
     EDAssert.equal("/path/to/working/dir", edConfiguration.getStringParamValue(xsPluginItem, "workingDir"))
     EDAssert.equal("/path/to/working/dir", EDConfiguration.getStringParamValue(xsPluginItem, "workingDir"))
     EDAssert.equal(3, edConfiguration.getIntegerParamValue(xsPluginItem, "number"))
     EDAssert.equal(3, EDConfiguration.getIntegerParamValue(xsPluginItem, "number"))
示例#11
0
    def testGetPluginItem(self):
        """
        Testing Plugin indexingMosflm Configuration
        """
        strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
        edConfiguration = EDConfiguration()
        edConfiguration.addConfigurationFile(strPath)
        xsPluginItem = edConfiguration.getXSConfigurationItem("indexingMosflm")
        EDAssert.equal("indexingMosflm", xsPluginItem.getName())

        paramList = xsPluginItem.getXSParamList()
        paramItems = paramList.getXSParamItem()

        EDAssert.equal("workingDir", paramItems[0].getName())
        EDAssert.equal("/path/to/working/dir", paramItems[0].getValue())
        EDAssert.equal("number", paramItems[1].getName())
        EDAssert.equal("3", paramItems[1].getValue())
示例#12
0
    def testGetPluginItem(self):
        """
        Testing Plugin indexingMosflm Configuration
        """
        strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
        edConfiguration = EDConfiguration()
        edConfiguration.addConfigurationFile(strPath)
        xsPluginItem = edConfiguration.getXSConfigurationItem("indexingMosflm")
        EDAssert.equal("indexingMosflm", xsPluginItem.getName())

        paramList = xsPluginItem.getXSParamList()
        paramItems = paramList.getXSParamItem()

        EDAssert.equal("workingDir", paramItems[0].getName())
        EDAssert.equal("/path/to/working/dir", paramItems[0].getValue())
        EDAssert.equal("number", paramItems[1].getName())
        EDAssert.equal("3", paramItems[1].getValue())
示例#13
0
 def testGetParamValue(self):
     """
     Testing the XSParamItem Value convertion from string to different formats
     """
     strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
     edConfiguration = EDConfiguration()
     edConfiguration.addConfigurationFile(strPath)
     xsPluginItem = edConfiguration.getXSConfigurationItem("indexingMosflm")
     EDAssert.equal(
         "/path/to/working/dir",
         edConfiguration.getStringParamValue(xsPluginItem, "workingDir"))
     EDAssert.equal(
         "/path/to/working/dir",
         EDConfiguration.getStringParamValue(xsPluginItem, "workingDir"))
     EDAssert.equal(
         3, edConfiguration.getIntegerParamValue(xsPluginItem, "number"))
     EDAssert.equal(
         3, EDConfiguration.getIntegerParamValue(xsPluginItem, "number"))
示例#14
0
 def testGetXSConfigurationItem1(self):
     strPath = os.path.join(self.strDataPath, "XSConfiguration.xml")
     edConfiguration = EDConfiguration()
     edConfiguration.addConfigurationFile(strPath)
     xsDataPluginItem = edConfiguration.getXSConfigurationItem("indexingMosflm")
     EDAssert.equal(True, xsDataPluginItem is not None, "Obtanied configuration for indexingMosflm")