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

Fix #15 #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix #15 #111

wants to merge 1 commit into from

Conversation

fabiosantoscode
Copy link
Contributor

This is a hackish monkey patch, but I found no way to do this using plugins.

It fixes the (officially closed) issue #15, which I and several other people were still experiencing.

The problem is reproduceable by creating a test-only model and running ./manage.py test instead of ./manage.py test <appnames>

This fix changes the loadTestsFromDir function in nose.loader.TestLoader from a lazy generator into a regular function returning a list. This makes the test modules along with their modules be imported upfront and thus be seen by Django.

@tomplayford
Copy link

Works for me. Thanks.

@msgre
Copy link

msgre commented Apr 17, 2013

Hello,
is there any chance, that this patch will be applied to official django-nose codebase soon?

@JanBednarik
Copy link

Hi, I have the same question as @msgre. Issue #15 is almost 3 years old and still hasn't been fixed. This patch is like a gift from heaven.

@fabiosantoscode
Copy link
Contributor Author

You can use the patch if you like. Pip allows installing arbitrary versions of a git repo to your virtualenv.

@JanBednarik
Copy link

I know, but that's not a straightforward way to maintain 3rd party packages.

@jwhitlock
Copy link
Contributor

@fabiosantoscode can you add a test that fails unless this patch is applied?

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

Successfully merging this pull request may close these issues.

5 participants