-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Doctests #12
Conversation
Why did you change the formatting of the doctests (apart from just changing |
The |
The double colon as in |
Easy to fix. I propose to postpone this change after #13 (Python 3 compatibility). @jdemeyer could you modify the travis script to check that building the documentation with sphinx works? |
I'll try to do that this week but I cannot promise anything. |
Actually, it turns out that Sphinx does understand the docstring style introduced in this PR. So nothing needs to be fixed... |
very good. Could you have a look at #13 ? |
Done! And it actually works. |
[] | ||
Tests: | ||
|
||
>>> from six.moves import range |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realised this doctests adds a useless dependency on six. Without the import, the doctest works just fine in Py2&3.
However, I'm not sure about the original intent of the test. Maybe replacing range(10)
with list(range(10))
is closer to it.
Opinions? I shall start a separate pull request for this.
You could do a similar thing as some other Python 2/3 doctests and just use |
Oh, I see. I had interpreted it the other way round. So a one line replacement compatible with both 2 & 3 would be |
Not quite since |
The branch
See also trac #22899 for the doctests that will be directly moved to Sage.