:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/stag-toolkit/sphinx/gen/gdscript/StagTest.xml. .. _class_StagTest: StagTest ======== **Experimental:** Fairly solidified, but changes may be made as seen fit. **Inherits:** ``Node`` Singleton for handling unit and integration tests. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | :ref:`Dictionary`\[``String``, ``String``\] | :ref:`args` | | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``Callable`` | :ref:`_quit_function` | ``_quit_default`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | :ref:`StagLogger` | :ref:`_logger` | | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | :ref:`Dictionary`\[``String``, ``Variant``\] | :ref:`statistics` | ``{...}`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | :ref:`Dictionary`\[``String``, ``Variant``\] | :ref:`test_data_default` | ``{...}`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``Dictionary`` | :ref:`test_data` | ```` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``Dictionary`` | :ref:`_benchmarks` | ``Dictionary()`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``Dictionary`` | :ref:`_reports_benchmarks` | ``Dictionary()`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``float`` | :ref:`_time_scale_base` | ``1.0`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``String`` | :ref:`_reports_path` | ``"res://test/reports/"`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``PackedStringArray`` | :ref:`tests` | ``[]`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``PackedStringArray`` | :ref:`test_failures` | ``[]`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``PackedStringArray`` | :ref:`_test_suffixes` | ``[]`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``int`` | :ref:`test_idx` | ``0`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``String`` | :ref:`active_path` | ``""`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``bool`` | :ref:`force_exiting` | ``false`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``bool`` | :ref:`test_resulted` | ``false`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``bool`` | :ref:`in_test` | ``false`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | :ref:`Array`\[:ref:`StagTest.TickTimer`\] | :ref:`_tick_timers_process` | ``[]`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | :ref:`Array`\[:ref:`StagTest.TickTimer`\] | :ref:`_tick_timers_physics_process` | ``[]`` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``Mutex`` | :ref:`_tick_timers_process_mu` | ```` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ | ``Mutex`` | :ref:`_tick_timers_physics_process_mu` | ```` | +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+---------------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_init`\ (\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_ready`\ (\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_exit_tree`\ (\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_begin`\ (\ test_root\: ``String``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``String`` | :ref:`_join_path`\ (\ directory\: ``String``, relpath\: ``String``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_print_rich`\ (\ msg\: ``String``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_display_post_test_message`\ (\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_walk_directory`\ (\ dirpath\: ``String``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_run_test`\ (\ filepath\: ``String``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_cleanup_test`\ (\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_finish_test`\ (\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_results`\ (\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_exit`\ (\ status\: ``int`` = 0\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_timeout`\ (\ timeout\: ``float``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_force_exit`\ (\ reason\: ``String``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_pass_test_if_not_failed`\ (\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``bool`` | :ref:`_has_failed`\ (\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``Variant`` | :ref:`_format_assertion_message`\ (\ message\: ``String``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``String`` | :ref:`_format_assertion_value`\ (\ val\: ``Variant``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``String`` | :ref:`_format_duration`\ (\ t\: ``float``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_add_report`\ (\ reports_list\: ``Dictionary``, new_report\: ``Variant``, label\: ``String``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_output_reports`\ (\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``int`` | :ref:`_ensure_directory`\ (\ filepath\: ``String``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_quit_default`\ (\ status\: ``int``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_process`\ (\ _delta\: ``float``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_physics_process`\ (\ _delta\: ``float``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_catch_error`\ (\ message\: ``String``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`override_exit_function`\ (\ new_quit\: ``Callable``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``bool`` | :ref:`is_active`\ (\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``String`` | :ref:`path`\ (\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`pause`\ (\ paused\: ``bool``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`time_scale`\ (\ new_scale\: ``float`` = _time_scale_base\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`teardown`\ (\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`skip`\ (\ reason\: ``String``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`fail`\ (\ reason\: ``String``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`assert_true`\ (\ value\: ``bool``, message\: ``String`` = ""\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`assert_equal`\ (\ a\: ``Variant``, b\: ``Variant``, message\: ``String`` = ""\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`assert_unequal`\ (\ a\: ``Variant``, b\: ``Variant``, message\: ``String`` = ""\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`assert_valid`\ (\ a\: ``Object``, message\: ``String`` = ""\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`assert_approx_equal`\ (\ a\: ``Variant``, b\: ``Variant``, message\: ``String`` = ""\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`assert_in_delta`\ (\ a\: ``Variant``, b\: ``Variant``, delta\: ``float`` = 1e-05, message\: ``String`` = ""\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StagTest.SignalExpector` | :ref:`signal_expector`\ (\ emitter\: ``Signal``, message\: ``String`` = ""\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``Signal`` | :ref:`tick_timer_process`\ (\ ticks\: ``int``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``Signal`` | :ref:`tick_timer_physics_process`\ (\ ticks\: ``int``\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StagTest.BenchmarkResult` | :ref:`benchmark`\ (\ f\: ``Callable``, count\: ``int``, label\: ``String``, timeout\: ``float`` = -1.0\ ) | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_StagTest_signal_test_post_ready: .. rst-class:: classref-signal **test_post_ready**\ (\ ) :ref:`🔗` Called just after beginning a test. .. rst-class:: classref-item-separator ---- .. _class_StagTest_signal_tick_process: .. rst-class:: classref-signal **tick_process**\ (\ ) :ref:`🔗` Emitted at the beginning of each process tick during the test. .. rst-class:: classref-item-separator ---- .. _class_StagTest_signal_tick_physics_process: .. rst-class:: classref-signal **tick_physics_process**\ (\ ) :ref:`🔗` Emitted at the beginning of each physics process tick during the test. .. rst-class:: classref-item-separator ---- .. _class_StagTest_signal_internal_tick_process_list_ready: .. rst-class:: classref-signal **internal_tick_process_list_ready**\ (\ ) :ref:`🔗` .. container:: contribute There is currently no description for this signal. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_signal_internal_tick_physics_process_list_ready: .. rst-class:: classref-signal **internal_tick_physics_process_list_ready**\ (\ ) :ref:`🔗` .. container:: contribute There is currently no description for this signal. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_signal_test_pre_exit: .. rst-class:: classref-signal **test_pre_exit**\ (\ ) :ref:`🔗` Called just before exiting a test. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_StagTest_ExitCodes: .. rst-class:: classref-enumeration enum **ExitCodes**: :ref:`🔗` .. _class_StagTest_constant_Ok: .. rst-class:: classref-enumeration-constant :ref:`ExitCodes` **Ok** = ``0`` .. container:: contribute There is currently no description for this enum. Please help us by `contributing one `__! .. _class_StagTest_constant_Failed: .. rst-class:: classref-enumeration-constant :ref:`ExitCodes` **Failed** = ``1`` .. container:: contribute There is currently no description for this enum. Please help us by `contributing one `__! .. _class_StagTest_constant_BadFile: .. rst-class:: classref-enumeration-constant :ref:`ExitCodes` **BadFile** = ``15`` .. container:: contribute There is currently no description for this enum. Please help us by `contributing one `__! .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Constants --------- .. _class_StagTest_constant_DEFAULT_TEST_PATH: .. rst-class:: classref-constant **DEFAULT_TEST_PATH** = ``"res://test/scenarios/"`` :ref:`🔗` .. container:: contribute There is currently no description for this constant. Please help us by `contributing one `__! .. _class_StagTest_constant_DEFAULT_BENCHMARK_PATH: .. rst-class:: classref-constant **DEFAULT_BENCHMARK_PATH** = ``"res://test/benchmarks/"`` :ref:`🔗` .. container:: contribute There is currently no description for this constant. Please help us by `contributing one `__! .. _class_StagTest_constant_DEFAULT_REPORTS_PATH: .. rst-class:: classref-constant **DEFAULT_REPORTS_PATH** = ``"res://test/reports/"`` :ref:`🔗` .. container:: contribute There is currently no description for this constant. Please help us by `contributing one `__! .. _class_StagTest_constant_DEFAULT_SUFFIXES: .. rst-class:: classref-constant **DEFAULT_SUFFIXES** = ``".tscn,.scn"`` :ref:`🔗` .. container:: contribute There is currently no description for this constant. Please help us by `contributing one `__! .. _class_StagTest_constant_DEFAULT_TIMEOUT: .. rst-class:: classref-constant **DEFAULT_TIMEOUT** = ``30.0`` :ref:`🔗` .. container:: contribute There is currently no description for this constant. Please help us by `contributing one `__! .. _class_StagTest_constant_DEFAULT_TIME_SCALE: .. rst-class:: classref-constant **DEFAULT_TIME_SCALE** = ``1.0`` :ref:`🔗` .. container:: contribute There is currently no description for this constant. Please help us by `contributing one `__! .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_StagTest_property_args: .. rst-class:: classref-property :ref:`Dictionary`\[``String``, ``String``\] **args** :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property__quit_function: .. rst-class:: classref-property ``Callable`` **_quit_function** = ``_quit_default`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property__logger: .. rst-class:: classref-property :ref:`StagLogger` **_logger** :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property_statistics: .. rst-class:: classref-property :ref:`Dictionary`\[``String``, ``Variant``\] **statistics** = ``{...}`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property_test_data_default: .. rst-class:: classref-property :ref:`Dictionary`\[``String``, ``Variant``\] **test_data_default** = ``{...}`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property_test_data: .. rst-class:: classref-property ``Dictionary`` **test_data** = ```` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property__benchmarks: .. rst-class:: classref-property ``Dictionary`` **_benchmarks** = ``Dictionary()`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property__reports_benchmarks: .. rst-class:: classref-property ``Dictionary`` **_reports_benchmarks** = ``Dictionary()`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property__time_scale_base: .. rst-class:: classref-property ``float`` **_time_scale_base** = ``1.0`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property__reports_path: .. rst-class:: classref-property ``String`` **_reports_path** = ``"res://test/reports/"`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property_tests: .. rst-class:: classref-property ``PackedStringArray`` **tests** = ``[]`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! **Note:** The returned array is *copied* and any changes to it will not update the original property value. See ``PackedStringArray`` for more details. .. rst-class:: classref-item-separator ---- .. _class_StagTest_property_test_failures: .. rst-class:: classref-property ``PackedStringArray`` **test_failures** = ``[]`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! **Note:** The returned array is *copied* and any changes to it will not update the original property value. See ``PackedStringArray`` for more details. .. rst-class:: classref-item-separator ---- .. _class_StagTest_property__test_suffixes: .. rst-class:: classref-property ``PackedStringArray`` **_test_suffixes** = ``[]`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! **Note:** The returned array is *copied* and any changes to it will not update the original property value. See ``PackedStringArray`` for more details. .. rst-class:: classref-item-separator ---- .. _class_StagTest_property_test_idx: .. rst-class:: classref-property ``int`` **test_idx** = ``0`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property_active_path: .. rst-class:: classref-property ``String`` **active_path** = ``""`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property_force_exiting: .. rst-class:: classref-property ``bool`` **force_exiting** = ``false`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property_test_resulted: .. rst-class:: classref-property ``bool`` **test_resulted** = ``false`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property_in_test: .. rst-class:: classref-property ``bool`` **in_test** = ``false`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property__tick_timers_process: .. rst-class:: classref-property :ref:`Array`\[:ref:`StagTest.TickTimer`\] **_tick_timers_process** = ``[]`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property__tick_timers_physics_process: .. rst-class:: classref-property :ref:`Array`\[:ref:`StagTest.TickTimer`\] **_tick_timers_physics_process** = ``[]`` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property__tick_timers_process_mu: .. rst-class:: classref-property ``Mutex`` **_tick_timers_process_mu** = ```` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_property__tick_timers_physics_process_mu: .. rst-class:: classref-property ``Mutex`` **_tick_timers_physics_process_mu** = ```` :ref:`🔗` .. container:: contribute There is currently no description for this property. Please help us by `contributing one `__! .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_StagTest_private_method__init: .. rst-class:: classref-method |void| **_init**\ (\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__ready: .. rst-class:: classref-method |void| **_ready**\ (\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__exit_tree: .. rst-class:: classref-method |void| **_exit_tree**\ (\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__begin: .. rst-class:: classref-method |void| **_begin**\ (\ test_root\: ``String``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__join_path: .. rst-class:: classref-method ``String`` **_join_path**\ (\ directory\: ``String``, relpath\: ``String``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__print_rich: .. rst-class:: classref-method |void| **_print_rich**\ (\ msg\: ``String``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__display_post_test_message: .. rst-class:: classref-method |void| **_display_post_test_message**\ (\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__walk_directory: .. rst-class:: classref-method |void| **_walk_directory**\ (\ dirpath\: ``String``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__run_test: .. rst-class:: classref-method |void| **_run_test**\ (\ filepath\: ``String``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__cleanup_test: .. rst-class:: classref-method |void| **_cleanup_test**\ (\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__finish_test: .. rst-class:: classref-method |void| **_finish_test**\ (\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__results: .. rst-class:: classref-method |void| **_results**\ (\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__exit: .. rst-class:: classref-method |void| **_exit**\ (\ status\: ``int`` = 0\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__timeout: .. rst-class:: classref-method |void| **_timeout**\ (\ timeout\: ``float``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__force_exit: .. rst-class:: classref-method |void| **_force_exit**\ (\ reason\: ``String``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__pass_test_if_not_failed: .. rst-class:: classref-method |void| **_pass_test_if_not_failed**\ (\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__has_failed: .. rst-class:: classref-method ``bool`` **_has_failed**\ (\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__format_assertion_message: .. rst-class:: classref-method ``Variant`` **_format_assertion_message**\ (\ message\: ``String``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__format_assertion_value: .. rst-class:: classref-method ``String`` **_format_assertion_value**\ (\ val\: ``Variant``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__format_duration: .. rst-class:: classref-method ``String`` **_format_duration**\ (\ t\: ``float``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__add_report: .. rst-class:: classref-method |void| **_add_report**\ (\ reports_list\: ``Dictionary``, new_report\: ``Variant``, label\: ``String``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__output_reports: .. rst-class:: classref-method |void| **_output_reports**\ (\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__ensure_directory: .. rst-class:: classref-method ``int`` **_ensure_directory**\ (\ filepath\: ``String``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__quit_default: .. rst-class:: classref-method |void| **_quit_default**\ (\ status\: ``int``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__process: .. rst-class:: classref-method |void| **_process**\ (\ _delta\: ``float``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__physics_process: .. rst-class:: classref-method |void| **_physics_process**\ (\ _delta\: ``float``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_private_method__catch_error: .. rst-class:: classref-method |void| **_catch_error**\ (\ message\: ``String``\ ) :ref:`🔗` .. container:: contribute There is currently no description for this method. Please help us by `contributing one `__! .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_override_exit_function: .. rst-class:: classref-method |void| **override_exit_function**\ (\ new_quit\: ``Callable``\ ) :ref:`🔗` Overrides the runtime exit function, in case the game needs additional teardown steps. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_is_active: .. rst-class:: classref-method ``bool`` **is_active**\ (\ ) :ref:`🔗` Returns true if StagTest is testing, in case the game needs to avoid certain setup steps. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_path: .. rst-class:: classref-method ``String`` **path**\ (\ ) :ref:`🔗` Returns the path of the active test. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_pause: .. rst-class:: classref-method |void| **pause**\ (\ paused\: ``bool``\ ) :ref:`🔗` Sets the pause of the scene tree. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_time_scale: .. rst-class:: classref-method |void| **time_scale**\ (\ new_scale\: ``float`` = _time_scale_base\ ) :ref:`🔗` Sets the engine time scale. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_teardown: .. rst-class:: classref-method |void| **teardown**\ (\ ) :ref:`🔗` Puts the test into Teardown mode. If the test is not skipped or failed during Teardown, it passes. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_skip: .. rst-class:: classref-method |void| **skip**\ (\ reason\: ``String``\ ) :ref:`🔗` Puts the test into Teardown mode (if not already), skipping the remainder of the test. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_fail: .. rst-class:: classref-method |void| **fail**\ (\ reason\: ``String``\ ) :ref:`🔗` Puts the test into Teardown mode (if not already), marking the test as failed. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_assert_true: .. rst-class:: classref-method |void| **assert_true**\ (\ value\: ``bool``, message\: ``String`` = ""\ ) :ref:`🔗` Assert that a given boolean is true. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_assert_equal: .. rst-class:: classref-method |void| **assert_equal**\ (\ a\: ``Variant``, b\: ``Variant``, message\: ``String`` = ""\ ) :ref:`🔗` Assert that two values are equal. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_assert_unequal: .. rst-class:: classref-method |void| **assert_unequal**\ (\ a\: ``Variant``, b\: ``Variant``, message\: ``String`` = ""\ ) :ref:`🔗` Assert that two values are NOT equal. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_assert_valid: .. rst-class:: classref-method |void| **assert_valid**\ (\ a\: ``Object``, message\: ``String`` = ""\ ) :ref:`🔗` Assert that the given instance is valid. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_assert_approx_equal: .. rst-class:: classref-method |void| **assert_approx_equal**\ (\ a\: ``Variant``, b\: ``Variant``, message\: ``String`` = ""\ ) :ref:`🔗` Assert that two values are equal within an epsilon value, that scales with magnitude. \ **Note**: to use a specific delta threshold value, use ``StagTest.assert_in_delta(...)`` instead. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_assert_in_delta: .. rst-class:: classref-method |void| **assert_in_delta**\ (\ a\: ``Variant``, b\: ``Variant``, delta\: ``float`` = 1e-05, message\: ``String`` = ""\ ) :ref:`🔗` Assert that two values are equal, within a threshold amount. Use ``StagTest.assert_approx_equal()`` if the delta must scale with magnitude. For floating-point vectors, the overall distance between vectors is compared. For integer vectors, Manhattan distance is used instead. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_signal_expector: .. rst-class:: classref-method :ref:`StagTest.SignalExpector` **signal_expector**\ (\ emitter\: ``Signal``, message\: ``String`` = ""\ ) :ref:`🔗` Creates a :ref:`StagTest.SignalExpector` from the given signal, which can be used for further assertions. The :ref:`StagTest.SignalExpector` is thread-safe. Fails the test if the signal is null, or if the signal could not be connected. .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_tick_timer_process: .. rst-class:: classref-method ``Signal`` **tick_timer_process**\ (\ ticks\: ``int``\ ) :ref:`🔗` Returns a signal that emits after the given amount of process ticks. If ``ticks`` is less than or equal to zero, the signal emits on the next process tick. :: await StagTest.tick_timer_process(10) # Wait 10 ticks # Resumes coroutine at the very beginning of tick 10 before anything else processes StagTest.assert_equal(10, process_ticks_stagtest, "awaited 10 process ticks") StagTest.assert_equal(9, process_ticks_node, "nodes are just about to process tick 10") .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_tick_timer_physics_process: .. rst-class:: classref-method ``Signal`` **tick_timer_physics_process**\ (\ ticks\: ``int``\ ) :ref:`🔗` Returns a signal that emits after the given amount of physics process ticks. If ``ticks`` is less than or equal to zero, the signal emits on the next physics tick. :: await StagTest.tick_timer_physics_process(10) # Wait 10 ticks # Resumes coroutine at the very beginning of tick 10 before anything else processes StagTest.assert_equal(10, physics_ticks_stagtest, "awaited 10 process ticks") StagTest.assert_equal(9, physics_ticks_node, "nodes are just about to process tick 10") .. rst-class:: classref-item-separator ---- .. _class_StagTest_method_benchmark: .. rst-class:: classref-method :ref:`StagTest.BenchmarkResult` **benchmark**\ (\ f\: ``Callable``, count\: ``int``, label\: ``String``, timeout\: ``float`` = -1.0\ ) :ref:`🔗` **Experimental:** This method may be changed or removed in future versions. Performs a timing benchmark of the Callable (with no arguments) the specified number of times, returning an analysis. If timeout is greater than zero, forcibly stops benchmark after X many seconds. If a test is skipped or failed during the benchmark, the benchmark exits without completing all iterations. Results are always in microseconds, unless otherwise specified. Use the ``--bench`` flag when running to output benchmark results. \ **Note**: Requires the compiled Rust backend. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`