def render_test_templates(self):
        self.logIt("Rendering test templates")
        
        testTepmplatesFolder = '%s/test/' % self.templateFolder
        for templateBase, templateDirectories, templateFiles in os.walk(testTepmplatesFolder):
            for templateFile in templateFiles:
                fullPath = '%s/%s' % (templateBase, templateFile)
                try:
                    self.logIt("Rendering test template %s" % fullPath)
                    fn = fullPath[12:] # Remove ./template/ from fullPath
                    f = open(os.path.join(self.templateFolder, fn))
                    template_text = f.read()
                    f.close()
                    
                    fullOutputFile = os.path.join(self.outputFolder, fn)
                    # Create full path to the output file
                    fullOutputDir = os.path.dirname(fullOutputFile)
                    if not os.path.exists(fullOutputDir):
                        os.makedirs(fullOutputDir)

                    newFn = open(fullOutputFile, 'w+')
                    newFn.write(template_text % self.__dict__)
                    newFn.close()
                except:
                    self.logIt("Error writing test template %s" % fullPath, True)
                    self.logIt(traceback.format_exc(), True)
dataset/ETHPy150Open GluuFederation/community-edition-setup/setup.py/Setup.render_test_templates/original