pytester.py revision 43be2ed2178db96177d31205e4b9692535612136
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#####################################################################
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm# Python test script for Inkscape DBus API.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm# Contains many examples of functions and various stress tests etc.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm# Multiple tests can be run at once but the output will be a bit chaotic.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm# List of test functions can be found at the bottom of the script.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#####################################################################
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#####################################################################
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm# Various test functions, called at bottom of script
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#####################################################################
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm if x == 1000:
62d835b4bbb0f1f046e30d9b67f8e9517cc6175cjohanengelen print "HALFWAY"
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm if x == 1:
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm print "BEGUN"
62d835b4bbb0f1f046e30d9b67f8e9517cc6175cjohanengelen #randomrect(document)
62d835b4bbb0f1f046e30d9b67f8e9517cc6175cjohanengelen print "DONE"
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm doc.document_set_css ("fill:#ff0000;fill-opacity:.5;stroke:#0000ff;stroke-width:5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none")
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm if x == 1000:
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm print "HALFWAY"
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm if x == 1:
doc.document_set_css ("fill:#000000;fill-opacity:.5;stroke:#000000;stroke-width:5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none")
for d in center:
for d in result:
doc.set_attribute(rect1, "transform", "matrix(0.08881734,0.94288151,-0.99604793,0.68505564,245.36153,118.60315)")
print result
for d in result:
doc.document_set_css ("fill:#ff0000;fill-opacity:.5;stroke:#0000ff;stroke-width:5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none")
doc.document_set_css ("fill:#ffff00;fill-opacity:1;stroke:#009002;stroke-width:5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none")
doc.document_set_css ("fill:#ffff00;fill-opacity:1;stroke:#009002;stroke-width:5;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none")
'/org/inkscape/application')