modal-labs / pytest-markdown-docs Goto Github PK
View Code? Open in Web Editor NEWRun pytest on markdown code fence blocks
License: MIT License
Run pytest on markdown code fence blocks
License: MIT License
Hi there!
Was just trying this plugin for a project I manage, and I came across a few warnings:
=========================================================================================== warnings summary ===========================================================================================
..\..\..\..\..\Python311\Lib\site-packages\pytest_markdown_docs\plugin.py:234
..\..\..\..\..\Python311\Lib\site-packages\pytest_markdown_docs\plugin.py:234
..\..\..\..\..\Python311\Lib\site-packages\pytest_markdown_docs\plugin.py:234
..\..\..\..\..\Python311\Lib\site-packages\pytest_markdown_docs\plugin.py:234
..\..\..\..\..\Python311\Lib\site-packages\pytest_markdown_docs\plugin.py:234
..\..\..\..\..\Python311\Lib\site-packages\pytest_markdown_docs\plugin.py:234
C:\Python311\Lib\site-packages\pytest_markdown_docs\plugin.py:234: PytestRemovedIn8Warning: The (fspath: py.path.local) argument to MarkdownTextFile is deprecated. Please use the (path: pathlib.Path) argument instead.
See https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path
return MarkdownTextFile.from_parent(parent, fspath=path)
..\..\..\..\..\Python311\Lib\site-packages\pytest_markdown_docs\plugin.py:232
..\..\..\..\..\Python311\Lib\site-packages\pytest_markdown_docs\plugin.py:232
C:\Python311\Lib\site-packages\pytest_markdown_docs\plugin.py:232: PytestRemovedIn8Warning: The (fspath: py.path.local) argument to MarkdownDocstringCodeModule is deprecated. Please use the (path: pathlib.Path) argument instead.
See https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path
return MarkdownDocstringCodeModule.from_parent(parent, fspath=path)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
==================================================================================== 2 passed, 8 warnings in 0.65s =====================================================================================
pytest
Version: 7.2.0It seems this might be the result of a pending change in pytest
, but perhaps I'm misreading that. Any thoughts?
Thank you for this exciting project!
This doesn't work with the recent pytest v8. I saw there is a pull request with a tentative fix: #17
Can this be verified and added as a new version that can be pulled via pip?
Hi,
first of all, thanks for your work on this project! I was really happy when I realized that I could test the code snippets in my docs :)
Unfortunately, I noticed that specifying additional verbs like notest
in a code fence, e.g.
```python notest
foobar = "baz"
```
results in detection errors of code blocks when using Material for MkDocs:
A possible workaround would be allowing users to specify notest
(or fixtures) within HTML comments above the code block, e.g.
<!-- notest -->
```python
foobar = "baz"
```
If this makes sense for you, I'm happy to give it a try in a PR :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.