def test_invoke_dictionary_methods(self, test_paths):
        myIo = IoAdapter()
        dictContainerList = myIo.readFile(inputFilePath=str(test_paths['pathPdbxDictFile']))
        mU = MethodUtils(dictContainerList=dictContainerList)

        dataContainerList = myIo.readFile(inputFilePath=str(test_paths['pathPdbxDataFile']))
        mU.setDataContainerList(dataContainerList=dataContainerList)

        mU.invokeMethods()
        print("Write data file after invoking methods")
        dataContainerList = mU.getDataContainerList()
        ok = myIo.writeFile(outputFilePath=str(test_paths['pathOutFile']), 
                            containerList=dataContainerList)
        assert ok
Exemple #2
0
    def testInvokeDictionaryMethods(self):
        """Test case -  invoke dictionary methods -"""
        try:
            myIo = IoAdapter(self.__verbose, self.__lfh)
            dictContainerList = myIo.readFile(inputFilePath=self.__pathPdbxDictFile)
            dataContainerList = myIo.readFile(inputFilePath=self.__pathPdbxDataFile)

            #
            mU = MethodUtils(dictContainerList=dictContainerList, verbose=self.__verbose)
            mU.setDataContainerList(dataContainerList=dataContainerList)
            mU.invokeMethods()
            logger.debug("Write data file after invoking methods")
            dataContainerList = mU.getDataContainerList()
            ok = myIo.writeFile(outputFilePath=self.__pathOutFile, containerList=dataContainerList)
            #
            self.assertEqual(ok, True)
        except Exception as e:
            logger.exception("Failing with %s", str(e))
            self.fail()