You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some amount of awaiting must occur before the first input test is run to ensure that tests pass. This can cause inconsistent results when running a single test, single script, or full run. In local testing waiting 10 frames before the first test is run gave consistent results. This delay appears to only be needed once per run, but that has not been confirmed.
funcbefore_all():
awaitwait_frames(10)
If you do not await after calling release_all in after_each, then the events do not have time to propagate.
funcafter_each():
_sender.release_all()
_sender.clear()
# Wait for key release to be processed. Otherwise the key release is# leaked to the next test and it detects an extra key release.awaitwait_frames(1)
Approach(es?)
GutInputTest Subclass
Creating a GutInputTest that extends GutTest could perform these awaits automatically and could provide additional features that are helpful when writing input tests.
This class could provide specific InputSenders automatically. An InputSender using Input might be the only one.
It could automatically call clear and release_all at the appropriate times for instances of InputSender.
There wouldn't be reason you couldn't just use this new class for all your tests, but they will be a tiny bit slower, so this should warn if no input tests were created. How would it tell? There's probably a way. No warning should appear when running a single test.
Using InputSender in GutTest would be deprecated.
The text was updated successfully, but these errors were encountered:
Versions
Known Timing Issues:
release_all
inafter_each
, then the events do not have time to propagate.Approach(es?)
GutInputTest
SubclassCreating a
GutInputTest
that extendsGutTest
could perform these awaits automatically and could provide additional features that are helpful when writing input tests.InputSender
s automatically. AnInputSender
usingInput
might be the only one.clear
andrelease_all
at the appropriate times for instances ofInputSender
.InputSender
inGutTest
would be deprecated.The text was updated successfully, but these errors were encountered: