Skip to content

Commit a4e21d2

Browse files
committed
Improve tests organization
1 parent ba8be1b commit a4e21d2

File tree

21 files changed

+38
-21
lines changed

21 files changed

+38
-21
lines changed

β€Ž.github/workflows/build.ymlβ€Ž

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,8 @@ jobs:
124124
ARGS="--build-dir=build/ ${{ steps.setup-godot.outputs.EXTRA_RUN_TESTS_ARGS }} -- --headless"
125125
python tests/run.py 0-gdscript $ARGS
126126
python tests/run.py 1-gdextension $ARGS
127-
python tests/run.py 2-pythonscript-init $ARGS
128-
# TODO
129-
# python tests/run.py 3-pythonscript-cython-only $ARGS
127+
python tests/run.py 2-init-with-python-hook $ARGS
128+
python tests/run.py 3-init-with-cython-hook $ARGS
130129
131130
# - name: 'Generate artifact archive'
132131
# run: meson compile -C build/ release
@@ -222,9 +221,8 @@ jobs:
222221
ARGS="--build-dir=build/ ${{ steps.setup-godot.outputs.EXTRA_RUN_TESTS_ARGS }} --custom-gdextension-api=./gdextension_api -- --headless"
223222
python tests/run.py 0-gdscript $ARGS
224223
python tests/run.py 1-gdextension $ARGS
225-
python tests/run.py 2-pythonscript-init $ARGS
226-
# TODO
227-
# python tests/run.py 3-pythonscript-cython-only $ARGS
224+
python tests/run.py 2-init-with-python-hook $ARGS
225+
python tests/run.py 3-init-with-cython-hook $ARGS
228226
229227
# - name: 'Install Mesa3D OpenGL'
230228
# shell: bash

β€Žtests/3-pythonscript-cython-only/expected.outputβ€Ž renamed to β€Žtests/2-init-with-python-hook/expected.outputβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ Godot Engine .* - https://godotengine.org
33
Pythonscript .* \(CPython .*\)
44
MY initialize 2
55
MY initialize 3
6+
Hello, World !
67
MY deinitialize 3
78
MY deinitialize 2

β€Žtests/2-pythonscript-init/main.gdβ€Ž renamed to β€Žtests/2-init-with-python-hook/main.gdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ extends Node
22

33
func _ready():
44
print("Hello, World !")
5+
56
# Exit godot
67
self.get_tree().quit()
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def initialize(level: int):
2+
print("MY initialize", level, flush=True)
3+
4+
5+
def deinitialize(level: int):
6+
print("MY deinitialize", level, flush=True)

β€Žtests/3-pythonscript-cython-only/project.godotβ€Ž renamed to β€Žtests/2-init-with-python-hook/project.godotβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ config_version=5
1212

1313
run/main_scene="res://main.tscn"
1414
; Force flush avoid out-of-order output from previous prints
15-
run/flush_stdout_on_print = true
15+
run/flush_stdout_on_print=true
1616
config/features=PackedStringArray("4.0")
1717
name="TestProject"
1818
main_scene="res://main.tscn"

0 commit comments

Comments
Β (0)