-
Notifications
You must be signed in to change notification settings - Fork 65
Added test for script() with .py extension #2144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
5c1cb4f
d967cd6
615b425
195e9fe
55853a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import vcs | ||
|
|
||
| list=["boxfill","meshfill","isofill","textcombined","texttable","vector"] | ||
| for obj in list: | ||
| s='' | ||
| tc='' | ||
| if obj == 'textcombined': | ||
|
||
| vcs.createtextcombined('EXAMPLE_tt', 'qa', 'EXAMPLE_tto', '7left') | ||
| tc="'EXAMPLE_tt','EXAMPLE_tto'" | ||
| code="s=vcs.get%s(%s)" % (obj, tc) | ||
| exec(code) | ||
|
||
| try: | ||
| s.script(obj+"_script.py") | ||
|
||
| except: | ||
| raise("Python script creation broke on "+obj+".script()") | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't name things reserved words in python (
listbeing the type of[]). It technically works but is bad form, and will break things later down the road.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you're missing a few:
Remove "textcombined" and "texttable"; these should be handled in a second loop, which will do secondary objects (marker, fillarea, colormap, line, textcombined, texttable, textorientation).