Skip to content

fix: expose markdown source as __file__ - #73

Merged
Elias Freider (freider) merged 1 commit into
modal-labs:mainfrom
tgolob:fix/expose-markdown-source-file
Nov 5, 2026
Merged

Elias Freider (freider) merged 1 commit into
modal-labs:mainfrom
tgolob:fix/expose-markdown-source-file

Conversation

@tgolob

@tgolob tgolob commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • expose the Markdown or Python source path to code fences through __file__
  • add a regression test that reads a neighboring fixture
  • document the source-path global

Closes #52.

Validation

  • uv run --group dev pytest -q — 44 passed
  • uv run --group dev ruff check src tests/plugin_test.py
  • uv run --group dev ruff format --check src tests/plugin_test.py
  • git diff --check

The repository's existing mypy run still reports the pre-existing missing annotation for _registered_runners in src/pytest_markdown_docs/_runners.py.

@freider
Elias Freider (freider) force-pushed the fix/expose-markdown-source-file branch from 3cdf14e to f108fbf Compare November 5, 2026 21:40

@freider Elias Freider (freider) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I like it!

@freider
Elias Freider (freider) merged commit 0cd53e7 into modal-labs:main Nov 5, 2026
5 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.

Support __file__ in markdown testing code.

2 participants