GithubHelp home page GithubHelp logo

pytest-markdown-docs's Issues

Broken with pytest v8

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?

Additional markers like `notest` are not compatible with MkDocs

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:

grafik

This is how it looks without `notest`

grafik

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 :)

Warning thrown from `pytest` Re: PytestRemovedIn8Warning

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 ===================================================================================== 

System Information

  • Operating System: Windows 11
  • pytest Version: 7.2.0
  • Python Version: 3.11.0

It 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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.