def testMakeDictionaryProxyBool(self): d=DictProxy() d["b"]=True d["a"]=False g=FoamFileGenerator(d) self.assertEqual(str(g),"b yes;\na no;\n") self.assertEqual(g.makeString(firstLevel=True),"b yes;\na no;\n")
def __str__(self): """Generates a string from the contents in memory Used to be called makeString""" string="// -*- C++ -*-\n// File generated by PyFoam - sorry for the ugliness\n\n" generator=FoamFileGenerator(self.content, header=self.header, longListThreshold=self.longListOutputThreshold) string+=generator.makeString(firstLevel=True) return string
def __str__(self): """Generates a string from the contents in memory Used to be called makeString""" string="// -*- C++ -*-\n// File generated by PyFoam - sorry for the ugliness\n\n" generator=FoamFileGenerator(self.content, header=self.header if not self.noHeader else None, longListThreshold=self.longListOutputThreshold) string+=generator.makeString(firstLevel=True) if len(self.lastDecoration)>0: string+="\n\n"+self.lastDecoration return string
def __str__(self): """Generates a string from the contents in memory Used to be called makeString""" string = "// -*- C++ -*-\n// File generated by PyFoam - sorry for the ugliness\n\n" generator = FoamFileGenerator( self.content, header=self.header if not self.noHeader else None, longListThreshold=self.longListOutputThreshold) string += generator.makeString(firstLevel=True) if len(self.lastDecoration) > 0: string += "\n\n" + self.lastDecoration return string