test: make pytest runnable without manual PYTHONPATH, fix stale asser… - #101
Merged
Conversation
…tions pytest previously required PYTHONPATH=src (only set in the Dockerfile) to even collect the test modules, and nothing enforced it, so `pytest` failed outright from a plain checkout. Add pyproject.toml pytest config that puts src on the path and add pytest to requirements.txt. Also update three tests that had drifted from the implementation: - test_room_types expected 7 room types, RoomType now has 8 (SECRET_ROOM) - test_room_colors referenced the removed globals.Room_Colors instead of the current utils.room_type.room_colors - test_to_json's expected string predates the "_seed" field in Floor.to_json globals_test.py::test_path is left failing on purpose - it's tracking a real bug in APPLICATION_PATH (Windows-only path stripping) to be fixed in a follow-up branch. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013qzxv6dWjnaUYoVpG8pQ58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pytest previously required PYTHONPATH=src (only set in the Dockerfile) to even collect the test modules, and nothing enforced it, so
pytestfailed outright from a plain checkout. Add pyproject.toml pytest config that puts src on the path and add pytest to requirements.txt.Also update three tests that had drifted from the implementation:
Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.
Types of changes
What types of changes does your code introduce to this project?
Put an
xin the boxes that apply