From 2fb2167a16b8f09f70187d65b23da115c2f6dbcd Mon Sep 17 00:00:00 2001 From: ThreeRhinosInAnElephantCostume Date: Sat, 11 Sep 2021 20:24:31 +0200 Subject: [PATCH] Document a workaround for testing GDScript files without a test() function This is a rather obscure feature that's unlikely to ever by used by anything other than https://github.com/godotengine/godot/pull/52068. Nevertheless, I think it's worth documenting. --- development/cpp/unit_testing.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/development/cpp/unit_testing.rst b/development/cpp/unit_testing.rst index 62f484bd3..342baa42d 100644 --- a/development/cpp/unit_testing.rst +++ b/development/cpp/unit_testing.rst @@ -347,3 +347,10 @@ If no errors are printed and everything goes well, you're done! recommend writing new tests for already resolved `issues related to GDScript at GitHub `_, or writing tests for currently working features. + +.. note:: + + If your test case requires that there is no ``test()`` + function present inside the script file, + you can disable the runtime section of the test by naming the script file so that it matches the pattern ``*.noscript.gd``. + For example, "test_empty_file.notest.gd".