Commit bc36034
Tighten 7 tests that passed without verifying behavior (#458)
* Tighten 7 tests that passed without verifying behavior
Audit of the GDScript + Python test suites surfaced seven tests whose
assertions didn't actually pin down the behavior they claimed to test —
they would have stayed green under regressions in the code paths they
exercise.
GDScript (test_project/tests/):
- test_theme.gd::test_theme_set_color_accepts_dict only checked the
response envelope. Now reloads the theme and asserts the stored value
is a Color with the right channels, so a missing dict->Color coercion
can't pass.
- test_theme.gd::test_create_theme_overwrite_allowed and
test_material.gd::test_create_overwrite_allowed now assert
overwritten=true on the response and that the target file still
exists, instead of just confirming the call returned data.
- test_material.gd::test_set_param_bool now reads emission_enabled back
off the loaded material (matching the read-back pattern its float and
color siblings already use).
- test_animation.gd::test_add_property_track_transition_raw_float now
reads the stored keyframes and asserts both that the dict values
coerced to Vector3 and that the raw-float transition landed on each
key — the prior version would pass even if either silently no-oped.
Python (tests/unit/):
- test_runtime_handlers.py::test_audio_player_create_blocks_when_not_writable
was catching bare Exception, which would mask unrelated bugs. Narrowed
to GodotCommandError to match the surrounding readiness-gate tests.
- test_self_update_smoke_harness.py::test_v240_preflight_passes_when_both_files_present
had zero assertions — it called the validator and returned. Added an
assertion that the call returns None so the runner's zero-assertion
guard has something to verify and the intent is documented.
https://claude.ai/code/session_01H8CLhwuNUA4NoEZ4neJk78
* Retrigger CI for Windows Godot tests
Linux + macOS Godot tests passed on the previous run; Windows failed in
~89s (vs ~134s on green main-branch runs), suggesting either a flake or
an early-pipeline failure. Pushing this empty commit to disambiguate.
https://claude.ai/code/session_01H8CLhwuNUA4NoEZ4neJk78
* Address review follow-ups on PR #458
- test_animation.gd: add value assert for v0 so both keyframes carry the
same depth of check (was: only v1 had a value assert; v0 was type-only).
- test_theme.gd: assert the alpha channel in
test_theme_set_color_accepts_dict — the test dict explicitly passes
a=1.0, so leaving it unchecked left a gap in the dict→Color coercion
coverage.
https://claude.ai/code/session_01H8CLhwuNUA4NoEZ4neJk78
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 3e6ac49 commit bc36034
5 files changed
Lines changed: 42 additions & 2 deletions
File tree
- test_project/tests
- tests/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
572 | 587 | | |
573 | 588 | | |
574 | 589 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| |||
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
182 | 189 | | |
183 | 190 | | |
184 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
99 | 113 | | |
100 | 114 | | |
101 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4869 | 4869 | | |
4870 | 4870 | | |
4871 | 4871 | | |
| 4872 | + | |
| 4873 | + | |
4872 | 4874 | | |
4873 | 4875 | | |
4874 | 4876 | | |
| |||
4881 | 4883 | | |
4882 | 4884 | | |
4883 | 4885 | | |
4884 | | - | |
| 4886 | + | |
4885 | 4887 | | |
4886 | 4888 | | |
4887 | 4889 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
233 | 235 | | |
234 | 236 | | |
235 | 237 | | |
| |||
0 commit comments