From ffcfcabfa56efde6b60256e3b5ac837f7da1e9da Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Wed, 22 Oct 2025 13:30:54 +0200 Subject: [PATCH] Allow opening itests in editor --- itest/godot/TestRunner.gd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/itest/godot/TestRunner.gd b/itest/godot/TestRunner.gd index a6f1bc503..21b43dafb 100644 --- a/itest/godot/TestRunner.gd +++ b/itest/godot/TestRunner.gd @@ -9,11 +9,11 @@ extends Node class_name GDScriptTestRunner func _ready(): - # Check that tests are invoked from the command line. Loading the editor may break some parts (e.g. generated test code). - # Both checks are needed (it's possible to invoke `godot -e --headless`). - if Engine.is_editor_hint() || DisplayServer.get_name() != 'headless': - push_error("Integration tests must be run in headless mode (without editor).") - get_tree().quit(2) + # Don't run tests when opened in the editor. + if Engine.is_editor_hint(): + if DisplayServer.get_name() == 'headless': + push_error("Opening itest in editor in headless mode is not supported.") + get_tree().quit(2) return # Ensure physics is initialized, for tests that require it.