Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doctest execution only for specific Python versions #3303

Closed
marco-buttu opened this issue Jan 3, 2017 · 1 comment
Closed

Doctest execution only for specific Python versions #3303

marco-buttu opened this issue Jan 3, 2017 · 1 comment
Labels
builder type:proposal a feature suggestion

Comments

@marco-buttu
Copy link
Contributor

Sometimes it is useful to execute a doctest only for specific Python versions. For instance, think at the Python documentation: if the doc explains a new feature available from Python 3.6, I would like the code example to be doctested only for Python >= 3.6. I was thinking to add an option like this one:

.. doctest::
   :pyversion: >= 3.6

In that case, also the testsetup, testcleanup and testcode directives should have this option. What do you think?

@tk0miya tk0miya added builder type:proposal a feature suggestion labels Jan 6, 2017
@tk0miya
Copy link
Member

tk0miya commented Jan 6, 2017

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
builder type:proposal a feature suggestion
Projects
None yet
Development

No branches or pull requests

2 participants