mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:45:54 +01:00
[PR #1442] run_semantic_tests: refuse the repository's tests folder, name tests/semantic (SEMANTIC-RUNNER-WRONG-FOLDER) #1472
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1472
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1442
Author: @Anonymous78e
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:scripts/semantic-runner-wrong-folder📝 Commits (1)
a5459a6run_semantic_tests: refuse the repository's tests folder, name tests/semantic (SEMANTIC-RUNNER-WRONG-FOLDER)📊 Changes
2 files changed (+26 additions, -0 deletions)
View changed files
📝
scripts/run_semantic_tests.py(+15 -0)📝
tests/test_run_semantic_tests.py(+11 -0)📄 Description
Claimed in the coordination issue as: SEMANTIC-RUNNER-WRONG-FOLDER (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7148344085)
What and why
@GTAVIB4GTAVI's finding:
python -I scripts/run_semantic_tests.py tests(the parent folder instead oftests/semantic) puts the wholetests/tree through unittest. It reports 42 failed files, and 36 of them are not real failures. 30 are files CI hands to pytest (PYTEST_FILE_MARKERSinci.yml), which cannot import underpython -I. 6 are script-style files with a__main__block and noTestCase. The runner's usage lines nametests/semantic, so this is a trap rather than a supported path.The runner now stops with a usage error (exit 2) when the directory is this repository's
testsfolder under any spelling (os.path.samefile). The message names the semantic subfolder and.github/workflows/ci.yml:Every documented call (README, AGENTS.md, CONTRIBUTING.md, docs/linux.md) and the CI call (
ci.yml:194) passestests/semanticand is unchanged; any other folder, such as the throwaway suites the runner's own tests build, is unaffected. Separate from #1051, which changes how failures are reported.Tested
Windows 11 Pro 26H2, CPython 3.13.15, on
main1154976d4:python -I tests/test_run_semantic_tests.py: 23 tests OK, including the newtest_the_repository_tests_folder_is_refused_before_running_anything(exit 2,-j 1and-j 2, nothing run, andtests/semanticis not refused).python -I scripts/run_semantic_tests.py tests -j 4: the usage error above, immediately.python -I scripts/run_semantic_tests.py tests/semantic -p test_exec_computed.py: 1 file, 2 tests, 0 failed.python -I tests/test_ci_registration.py: OK.python -m compileall -qandscripts/check_no_game_data.pyon both files: clean.GPUs tested: n/a
AI-assisted: yes (Claude Code, Claude Opus 5.5)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
https://claude.ai/code/session_014sDZDAAcsauTL6d8ie67Qo
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.