Skip to content

fix: expose markdown source as __file__ - #73

Open
tgolob wants to merge 1 commit into
modal-labs:mainfrom
tgolob:fix/expose-markdown-source-file
Open

fix: expose markdown source as __file__#73
tgolob wants to merge 1 commit into
modal-labs:mainfrom
tgolob:fix/expose-markdown-source-file

Conversation

@tgolob

@tgolob tgolob commented Aug 22, 2026

Copy link
Copy Markdown

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.

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.

1 participant