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 configuration optionflags. Enhancement. #7

Open
jpellerin opened this issue Dec 14, 2011 · 10 comments
Open

Doctest configuration optionflags. Enhancement. #7

jpellerin opened this issue Dec 14, 2011 · 10 comments
Assignees
Labels

Comments

@jpellerin
Copy link
Member

It would be useful to allow users to specify doctest option flags such as +ELLIPSIS or
+NORMALIZE_WHITESPACE in the configuration file and/or on the command line.

Attached is a patch that permits this with the added option --doctest-options which accepts a
comma separated list of option flags such as "+ELLIPSIS,+NORMALIZE_WHITESPACE".

Google Code Info:
Issue #: 306
Author: [email protected]
Created On: 2009-11-12T02:05:06.000Z
Closed On:

@ghost ghost assigned jpellerin Dec 14, 2011
@jpellerin
Copy link
Member Author

Correct patch.

Google Code Info:
Author: [email protected]
Created On: 2009-11-12T03:59:48.000Z

@jpellerin
Copy link
Member Author

Google Code Info:
Author: [email protected]
Created On: 2009-11-12T15:06:57.000Z

@jpellerin
Copy link
Member Author

I applied the patch here http://bitbucket.org/kumar303/nose-doctest-306/

I also added unit and functional tests and amended the documentation. There are two
tests failing in 2.4 only but those were already failing in the nose-unstable fork I
pulled from (init_plugin.rst doctest)

Google Code Info:
Author: kumar.mcmillan
Created On: 2009-11-12T17:16:22.000Z

@jpellerin
Copy link
Member Author

Has there been any progress on this? This would singlehandedly make nose actually useful with doctests. Thanks. :)

Google Code Info:
Author: [email protected]
Created On: 2010-10-22T12:24:41.000Z

@jpellerin
Copy link
Member Author

Applying this patch to nose 1.1.2 seems to work fine on my system. I have a project with hundreds of doctests, and the nose plugin to PyDev/Eclipse became much more useful with the patch.

Google Code Info:
Author: [email protected]
Created On: 2011-10-30T13:52:55.000Z

@jpellerin
Copy link
Member Author

Patch: https://gist.github.com/1477317

@xim
Copy link

xim commented Jan 30, 2012

NLTK, the Natural Language ToolKit for Python uses a lot of doctests that need +ELLIPSIS and/or +NORMALIZE_WHITESPACE. We have successfully been running our tests with this patch. Would love to see this applied in master so we don't have to bundle a patched version of nose to run our test suite…

@xim xim mentioned this issue Feb 8, 2012
xim pushed a commit to xim/nose that referenced this issue Feb 12, 2012
@xim xim mentioned this issue Feb 12, 2012
@amueller
Copy link

This patch would really be great for scikit-learn, too.
We have the same issues as nltk.

Does anyone plan on including this or do we have to monkey-patch?

@amueller
Copy link

Oh, it looks like this was merged. is that right?

@jpellerin
Copy link
Member Author

Yeah, this is in 1.2.1, unless I've done something very wrong.

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

No branches or pull requests

3 participants