simplistix / sybil

Automated testing for the examples in your documentation.

Home Page:https://sybil.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide ways to skip tests

pauleveritt opened this issue · comments

I spoke with Chris about this elsewhere, discovered another need.

Sometimes you have chunks of samples in docs that you don't want executed. They're un-runnable pseudocode. It would be nice to have a way to say "don't test these". Chris suggested a couple of variations of Sphinx directives.

Other times you want to skip when tox tests under certain interpreters. For example I have a snippet with a dataclass, in a package with optional dataclass support. I want the equivalent of:
@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher")

Although it would be unique to pytest, it would be cool to have a Sphinx directive for skipif with the directive arguments matching the signature of skipif.

Work in progress is here, lemme know your thoughts.

Branch landed.