﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
7693	Different import paths can impact whether doctests are run or not.	Dave Naffziger	nobody	"My directory structure looks like this:

/appname/models.py
/appname/utils/__init__.py (empty)
/appname/utils/util1.py

in util1.py, I do this:
from appname.models import Class1, Class2

This import causes the doctests in models.py to not run. If I remove util1.py entirely, the doctests in models.py are run.

I patched this by editing line 895 in root/django/trunk/django/test/_doctest.py
I changed it from:
            return module.__name__ == object.__module__
to 
            return module.__name__.find(object.__module__) >=0

In my example above: 
module.__name__ = 'appname.models' and
object.__module__ = 'projectname.appname.models'

I'm selecting 'has patch' and attaching the file, but frankly am not sure if this is the right way to handle this or not."		closed	Testing framework	dev		invalid			Unreviewed	1	0	0	0	0	0
