nose-devs/nose — Issue #276: doctest calls getpackage() and uses the result without verifying if it's valid
Author: jpellerin
Created: 2011-12-14 16:06:16+00:00
State: open

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: