django-nose icon indicating copy to clipboard operation
django-nose copied to clipboard

Fix #15

Open fabiosantoscode opened this issue 11 years ago • 6 comments

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.

fabiosantoscode avatar Mar 14 '13 16:03 fabiosantoscode

Works for me. Thanks.

tomplayford avatar Mar 18 '13 16:03 tomplayford

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

msgre avatar Apr 17 '13 07:04 msgre

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.

JanBednarik avatar Apr 18 '13 17:04 JanBednarik

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

fabiosantoscode avatar Apr 18 '13 18:04 fabiosantoscode

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

JanBednarik avatar Apr 19 '13 07:04 JanBednarik

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

jwhitlock avatar Aug 05 '15 01:08 jwhitlock