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
I am encountering an issue where the Godot debugger pauses when an exception occurs during a GUT test, preventing the test from completing. I would like the test to fail instead of the debugger pausing.
Steps to Reproduce:
Set up a GUT test in your Godot project.
Trigger an error in the test, such as calling a nonexistent function.
Run the test.
The text was updated successfully, but these errors were encountered:
Unfortunately there is no way to detect when an exception occurs. Godot doesn't have any exception handling and they have stated that it won't ever be added. Issue #210 has more information.
If you have a test that will always cause an error you can skip it if the debugger is enabled by checking EngineDebugger.is_active(). If you do this you should call fail_test or pending when the debugger is active so that you can see a test was skipped.
functest_causes_error():
if(EngineDebugger.is_active()):
pending("Skipped test because debugger is on")
return# put your test logic here
If you want to skip an entire script if the debugger is enabled you can implement the should_skip_script method. This will mark the script as "risky" and none of the tests will be run.
Versions
The Bug
I am encountering an issue where the Godot debugger pauses when an exception occurs during a GUT test, preventing the test from completing. I would like the test to fail instead of the debugger pausing.
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: