Skip to content

Automation of running/testing many examples #230

Answered by hx2A
villares asked this question in Q&A
Discussion options

You must be logged in to vote

I really wish py5 had a better testing framework! Yet another thing to work on.

I'm on Linux, not on MacOS, suppose I'd like to run them without blocking (because I think I'm going to try pyautogui to interact with them and then close them for me, that would be the equivalent of module mode py5.run_sketch(block=False). How to do that?

pyautogui sounds like a good approach. I see why you would want block=False. The imported.run_code() method can't do that for you though. In that case, the user's code gets added to this template:

_CODE_FRAMEWORK = """{0}



run_sketch(block=True, py5_options={2}, sketch_args={3})
if {1} and is_dead_from_error:
    exit_sketch()
"""

block=True, and py5_op…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@villares
Comment options

villares Feb 4, 2023
Collaborator Author

@villares
Comment options

villares Feb 5, 2023
Collaborator Author

@hx2A
Comment options

@hx2A
Comment options

Answer selected by villares
Comment options

villares
Feb 6, 2023
Collaborator Author

You must be logged in to vote
1 reply
@hx2A
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants