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 calls getpackage() and uses the result without verifying if it's valid #276

Open
jpellerin opened this issue Dec 14, 2011 · 0 comments
Assignees

Comments

@jpellerin
Copy link
Member

What steps will reproduce the problem?

I don't have a small, self-contained test case for this, but hopefully the
issue is fairly self-explanatory.

In:

http://code.google.com/p/python-nose/source/browse/trunk/nose/plugins/doctests.py#222

the doctest plugin calls getpackage() and then uses that result as the
argument to a .startswith() call. But getpackage can return None, and in
such cases, it crashes Nose.

I am getting that crash in a plugin I'm building, based on the doctest one,
to recognize doctests in extension modules.

What is the expected output? What do you see instead?

No crash. It crashes.

What version of the product are you using? On what operating system?

Nose 0.10.1 on Linux, but the issue is in the trunk as of 2008-06-21.

Please provide any additional information below.

I could try to put together an example with my plugin, but it's in hacking
mode and the issue is hopefully clear enough from the above description.

Google Code Info:
Issue #: 195
Author: fperez....@gmail.com
Created On: 2008-06-21T20:20:59.000Z
Closed On:

@ghost ghost assigned jpellerin Dec 14, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant