From 18f6bddf7010b01754d6feb5f96557214e3ead8c Mon Sep 17 00:00:00 2001 From: Butch Wesley Date: Mon, 15 Aug 2022 13:38:55 -0400 Subject: [PATCH] I393 file prefix breaks running from scene. (#394) * suffix enhancement broke running from scene. * CHANGES and version bump --- CHANGES.md | 2 ++ README.md | 2 +- addons/gut/gut.gd | 4 +++- addons/gut/plugin.cfg | 2 +- addons/gut/plugin_control.gd | 3 --- addons/gut/utils.gd | 2 +- gut_panel.png.import | 35 +++++++++++++++++++++++++++++++++++ scenes/main.tscn | 3 --- 8 files changed, 43 insertions(+), 10 deletions(-) create mode 100644 gut_panel.png.import diff --git a/CHANGES.md b/CHANGES.md index 8abf2fb5..071228e1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +# 7.4.1 +* __Issue i393__ 7.4.0 broke running from a scene. On a side note, try the new and improved Gut Panel! It __did not__ break in the last release and was significantly improved! # 7.4.0 diff --git a/README.md b/README.md index 9344786c..c6a0f60f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Gut 7.4.0 +# Gut 7.4.1 GUT (Godot Unit Test) is a unit testing framework for the [Godot Engine](https://godotengine.org/). It allows you to write tests for your gdscript in gdscript. ### Donate/Shameless Plug diff --git a/addons/gut/gut.gd b/addons/gut/gut.gd index 748bd741..6e5dc02f 100644 --- a/addons/gut/gut.gd +++ b/addons/gut/gut.gd @@ -135,6 +135,8 @@ var _before_all_test_obj = load('res://addons/gut/test_collector.gd').Test.new() # Used for proper assert tracking and printing during after_all var _after_all_test_obj = load('res://addons/gut/test_collector.gd').Test.new() + +var _file_prefix = 'test_' const SIGNAL_TESTS_FINISHED = 'tests_finished' const SIGNAL_STOP_YIELD_BEFORE_TEARDOWN = 'stop_yield_before_teardown' @@ -1118,7 +1120,7 @@ func add_script(script): # with the suffix. Does not look in sub directories. Can be called multiple # times. # ------------------------------------------------------------------------------ -func add_directory(path, prefix="test_", suffix=".gd"): +func add_directory(path, prefix=_file_prefix, suffix=".gd"): # check for '' b/c the calls to addin the exported directories 1-6 will pass # '' if the field has not been populated. This will cause res:// to be # processed which will include all files if include_subdirectories is true. diff --git a/addons/gut/plugin.cfg b/addons/gut/plugin.cfg index 65ede8d7..ee669be4 100644 --- a/addons/gut/plugin.cfg +++ b/addons/gut/plugin.cfg @@ -3,5 +3,5 @@ name="Gut" description="Unit Testing tool for Godot." author="Butch Wesley" -version="7.4.0" +version="7.4.1" script="gut_plugin.gd" diff --git a/addons/gut/plugin_control.gd b/addons/gut/plugin_control.gd index 05d1a616..0e14cea0 100644 --- a/addons/gut/plugin_control.gd +++ b/addons/gut/plugin_control.gd @@ -69,8 +69,6 @@ export var _yield_between_tests = true # development to prevent any breaking changes and will likely be removed in # the future. export var _disable_strict_datatype_checks = false -# The prefix used to find test methods. -export var _test_prefix = 'test_' # The prefix used to find test scripts. export var _file_prefix = 'test_' # The suffix used to find test scripts. @@ -180,7 +178,6 @@ func _setup_gut(): _gut._tests_like = _tests_like _gut._inner_class_name = _inner_class_name - _gut._test_prefix = _test_prefix _gut._file_prefix = _file_prefix _gut._inner_class_prefix = _inner_class_prefix _gut._temp_directory = _temp_directory diff --git a/addons/gut/utils.gd b/addons/gut/utils.gd index ae968cb8..18032a02 100644 --- a/addons/gut/utils.gd +++ b/addons/gut/utils.gd @@ -98,7 +98,7 @@ var TestCollector = load('res://addons/gut/test_collector.gd') var ThingCounter = load('res://addons/gut/thing_counter.gd') # Source of truth for the GUT version -var version = '7.4.0' +var version = '7.4.1' # The required Godot version as an array. var req_godot = [3, 2, 0] # Used for doing file manipulation stuff so as to not keep making File instances. diff --git a/gut_panel.png.import b/gut_panel.png.import new file mode 100644 index 00000000..88dc13b9 --- /dev/null +++ b/gut_panel.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/gut_panel.png-51315c4dbef24e14bb14c0ee0272b7be.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://gut_panel.png" +dest_files=[ "res://.import/gut_panel.png-51315c4dbef24e14bb14c0ee0272b7be.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/scenes/main.tscn b/scenes/main.tscn index 119a7fb8..13daa7e3 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -36,9 +36,6 @@ margin_right = 844.257 margin_bottom = 331.628 rect_min_size = Vector2( 740, 250 ) script = ExtResource( 2 ) -__meta__ = { -"_edit_use_anchors_": false -} _font_name = "CourierPrime" _font_color = Color( 0.733333, 0.733333, 0.733333, 1 ) _background_color = Color( 0.14902, 0.14902, 0.14902, 1 )