def testMiniTextRender(self): self.compileMandel() handle = fract4dc.pf_load(Test.pf_name) pfunc = fract4dc.pf_create(handle) fract4dc.pf_init(pfunc,pos_params,[0,4.0]) image = [] for y in range(-20,20): line = [] for x in range(-20,20): (iter,fate,dist,solid) = fract4dc.pf_calc(pfunc,[x/10.0,y/10.0,0,0],100) if(fate == 32): line.append("#") else: line.append(" ") image.append("".join(line)) printable_image = "\n".join(image) self.assertEqual(printable_image[0], " ", printable_image) self.assertEqual(printable_image[20*41+20],"#", printable_image) # in the middle