Skip to content

docs/first_light: the test has 48 cases, not twenty-five (DOC-FIRST-LIGHT-TEST-COUNT) - #912

Merged
Andretuta merged 1 commit into
ProjectLeonida:mainfrom
TuroYT:docs/first-light-48-cases
Nov 25, 2026
Merged

Andretuta merged 1 commit into
ProjectLeonida:mainfrom
TuroYT:docs/first-light-48-cases

Conversation

@TuroYT

@TuroYT TuroYT commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: DOC-FIRST-LIGHT-TEST-COUNT (#14 (comment))

What was wrong

  • docs/first_light.md:73 says "The test has twenty-five cases" and then lists groups that do not match the file.
  • docs/first_light.md:141 says the default run "runs 46 tests: 42 passed, 4 skipped". A real run gives 48 tests, 44 passed, 4 skipped.

Reproduction on origin/main (a289278):

  • grep -n "twenty-five" docs/first_light.md prints line 73.
  • grep -c 'def test_' tests/test_first_light.py prints 48.
  • The unittest loader count prints 48 (it loads the module and does not run it).
  • python3 -I tests/test_first_light.py prints Ran 48 tests and OK (skipped=4).

What changed

  • Line 73 now says the test has 48 cases and points to python -I tests/test_first_light.py -v. The breakdown is removed. I could not tie every group to a class with certainty, so the sentence states only the total.
  • Line 141 and the last line of that paragraph now say 48 tests, 44 passed, 4 skipped, and none of the 48 is skipped when LEONIDA_FIRST_LIGHT_DIR is set. The line was changed because the run above proves it stale. No other number changed.

Overlap check: PRs #33, #35 and #801 change docs/first_light.md at line 203 (section 8). PR #100 changes it at line 26. None of them touch lines 73 or 141-147.

Tested

  • python3 -I -c "...loadTestsFromModule(m).countTestCases()" (loader): 48
  • python3 -I tests/test_first_light.py: Ran 48 tests in 0.070s, OK (skipped=4)
  • python3 -I tests/test_text_write_line_endings.py: OK
  • python3 -I scripts/check_no_game_data.py docs/first_light.md: exit 0
  • git diff --check: clean
  • git grep -l 'first_light.md' -- tests/ scripts/: no file reads the doc, so no other standalone test needs a run

Not tested

  • The package-gated cases (LEONIDA_FIRST_LIGHT_DIR set). They need game files, which this change does not use. The 4 skipped cases were not run.
  • The rendered Markdown page. Only the diff was checked.

AI-assisted (Claude Code).

…IGHT-TEST-COUNT)

The unittest loader counts 48 cases in tests/test_first_light.py, and the
sentence on the old breakdown no longer matched. The breakdown is dropped.
The pass/skip line now matches a real run: 48 tests, 44 passed, 4 skipped.
@PierreEbele

Copy link
Copy Markdown
Contributor

Reviewed fc2d07a: docs-only change. docs/first_light.md now matches tests/test_first_light.py.

Checked on main 3ff2a2a:

  • python3 -I tests/test_first_light.py in a sandbox with no LEONIDA_FIRST_LIGHT_DIR ran 48 tests: 44 passed, 4 skipped. That is exactly the new "48 tests: 44 passed, 4 skipped", and the file has 48 def test_ methods.
  • Main's "twenty-five cases" and "46 tests: 42 passed" are both stale.
  • Replacing the hand-written case list with "48 cases; -v prints each one" means the list can no longer fall out of date. Only the count still needs updating when tests are added.
  • The branch merges cleanly into current main.

AI-assisted review.

Recommendation: Merge

@Andretuta
Andretuta merged commit cff3784 into ProjectLeonida:main Nov 25, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants