Update unitbase.gd and Bessere Tests

unitbase.gd now sets 'config.logger_level = CoreTypes.LoggerLevel.DIAG' and checks in 'unload_framework()' if the test was skipped and if so it does not crash.
This commit is contained in:
JeremyStar™ 2024-04-06 13:58:37 +02:00
parent 1febf32f73
commit ccec39d85a
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
2 changed files with 5 additions and 2 deletions

@ -1 +1 @@
Subproject commit 7b9c84b805e286b7989534bcba6e5b45badc0e52
Subproject commit 7c8406a2b2f12f9f711552af34d5318139d08ca8

View file

@ -31,6 +31,7 @@ func after_each() -> void:
func load_framework(config: CoreConfiguration = CoreConfiguration.new()) -> void:
if is_framework_loaded(): await unload_framework()
ldiag("Loading framework")
config.logger_level = CoreTypes.LoggerLevel.DIAG
core = Core.new(config)
get_tree().root.add_child(core)
await get_tree().process_frame
@ -43,7 +44,9 @@ func unload_framework() -> void:
get_tree().root.remove_child.call_deferred(core)
core = null
await get_tree().process_frame
else: lcrash("Can't unload framework: Framework is not loaded")
else:
if test_status == 3: lerror("Can't unload framework: Framework is not loaded")
else: lcrash("Can't unload framework: Framework is not loaded")
func is_framework_loaded() -> bool: return get_node_or_null("/root/CORE") != null