Esempio n. 1
0
 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!"
Esempio n. 2
0
 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()
Esempio n. 3
0
 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()
Esempio n. 4
0
 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!"