Skip to content

Fix fixture paths and decoding in the resource guide - #341

Open
cloudgpuapp wants to merge 1 commit into
python:mainfrom
cloudgpuapp:docs/fix-resource-fixture-examples
Open

cloudgpuapp wants to merge 1 commit into
python:mainfrom
cloudgpuapp:docs/fix-resource-fixture-examples

Conversation

@cloudgpuapp

Copy link
Copy Markdown

The filesystem example starts in email/tests/test_email.py, so adding another tests component points to a directory that does not exist. The resource examples also describe UTF-8 decoding without passing an encoding to read_text(). Use the sibling data directory, pass UTF-8 explicitly, and make the two anchor examples independent of earlier snippets.

I ran the four changed snippets against the documented package layout with a non-ASCII UTF-8 fixture and Python UTF-8 mode disabled in the C locale. All four passed. The Sphinx HTML build passed with warnings treated as errors.

AI assistance was used to prepare and test this documentation change.

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.

1 participant