def test_double_mirror_y(self): """Check that graphic is mirrored y properly twice.""" graphic = Graphic(etree.parse("arrow.svg").getroot()) graphic2 = Graphic(etree.parse("arrow.svg").getroot()) graphic.set_mirror_y(True) graphic.set_mirror_y(False) assert graphic.get_bounding_box() == graphic2.get_bounding_box(), "They should be the same!"
def test_mirror_y(self): """Check that graphic is mirrored properly about the y axis.""" graphic = Graphic(etree.parse("arrow.svg").getroot()) graphic.set_mirror_y(True) f = open("out/arrow_%s.svg" % sys._getframe().f_code.co_name, "w") f.write(graphic.get_xml()) f.close()
def test_double_mirror_y(self): """Check that graphic is mirrored y properly twice.""" graphic = Graphic(etree.parse("arrow.svg").getroot()) graphic2 = Graphic(etree.parse("arrow.svg").getroot()) graphic.set_mirror_y(True) graphic.set_mirror_y(False) assert graphic.get_bounding_box() == graphic2.get_bounding_box( ), "They should be the same!"