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

PyUnrunDoctestsBear: Detect doctests that are not actually run #1283

Open
adtac opened this issue Jan 10, 2017 · 9 comments
Open

PyUnrunDoctestsBear: Detect doctests that are not actually run #1283

adtac opened this issue Jan 10, 2017 · 9 comments

Comments

@adtac
Copy link
Member

adtac commented Jan 10, 2017

    This will print "Hi"
    >>> print("Not hi")
    Hi

This will actually not fail tests because a linebreak is required between the english sentence and the doctest.

A nice security feature :)

@sils
Copy link
Member

sils commented Jan 10, 2017

this should be using the AnnotationBear but not until it has been refactored by @abhsag24

@adtac
Copy link
Member Author

adtac commented Jan 10, 2017

@NiklasMM suggested PyIgnoredDoctestsBear, which I think is better :)

@aptrishu
Copy link
Member

aptrishu commented Feb 7, 2017

@sils How exactly are you suggesting to solve this with AnnotationBear ?

@sils
Copy link
Member

sils commented Feb 7, 2017

@aptrishu annotationbear identifies comments right?

@aptrishu
Copy link
Member

aptrishu commented Feb 7, 2017

yup. It does.

@adtac
Copy link
Member Author

adtac commented Oct 19, 2017

@sils Still blocked?

@aptrishu
Copy link
Member

review please :P #1332

@adtac
Copy link
Member Author

adtac commented Oct 19, 2017

Clicked on the link, it took a good 2-3 seconds to load. Immediately realized it's that PR :D

silently goes back to something else without reviewing

@jayvdb
Copy link
Member

jayvdb commented Jul 15, 2018

Another gotcha with doctest is that they are ignored in nested functions and maybe other similar obscure locations. See pyflakes tests for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

7 participants