Hi Eric,

That's what I have done at the moment, but as you say it's a bit of a
hack and I'm not sure that I'm happy with it.

--
Adam J. Forster

On 23 Sep, 20:33, "Eric Holscher" <[EMAIL PROTECTED]> wrote:
> You can just put a models.py there that is empty. A slight hack, but it
> should work just fine. (Think of it as __init__.py's big brother :))
>
> Eric
>
> On Tue, Sep 23, 2008 at 2:27 PM, Adam J. Forster <[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > Firstly I'm sorry if I have posted this in the wrong place, but I
> > think that it belongs here and not on the django-users list.
>
> > Here's my problem, in most of our projects at work we have an app
> > called 'core' which contains modules that are either used by several
> > other apps or are not specific/large enough to justify their being in
> > their own apps.
>
> > Today I needed to write some doctests for a function in core.utils so
> > I created a tests.py file inside core and placed my doctest there.
> > When I attempted to run the tests using 'manage.py test' I found that
> > they were not being run, when I ran 'manage.py test core' I got the
> > following error:
>
> > django.core.exceptions.ImproperlyConfigured: App with label core could
> > not be found
>
> > After some digging around in the Django source code I found the
> > problem. django.test.simple.run_tests makes calls to either
> > django.db.models.get_apps or django.gb.models.get_app to identify
> > which app(s) to search for tests. These functions return the models
> > module for the app, if the app does not contain a models module it is
> > not considered to be a valid app and is therefore not searched for
> > tests.
>
> > This is not the first time that I have had an app which does not
> > contain a models module, and I can foresee that I will do the same
> > thing in the future. These apps may not contain models but they still
> > have code which needs testing.
>
> > So my question is should I file this as a bug and start working on a
> > patch for simple.run_tests that checks all INSTALLED_APPS for both
> > models.py and tests.py when searching for tests? Or is this something
> > which is not likely to change, in which case would I be better off
> > writing my own test runner instead?
>
> > Kind regards,
> > --
> > Adam J. Forster
>
> --
> Eric Holscher
> Web Developer at The World Company in Lawrence, Kshttp://www.ericholscher.com
> [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to