#7715: admin_tests failures when running Django tests in one natural fashion
---------------------------------------+------------------------------------
          Reporter:  mtredinnick       |         Owner:  nobody
            Status:  new               |     Milestone:        
         Component:  Unit test system  |       Version:  SVN   
        Resolution:                    |      Keywords:        
             Stage:  Unreviewed        |     Has_patch:  0     
        Needs_docs:  0                 |   Needs_tests:  0     
Needs_better_patch:  0                 |  
---------------------------------------+------------------------------------
Comment (by russellm):

 Replying to [comment:4 mtredinnick]:
 > Instead of asking testers to not use the most obvious name in the world
 for their settings files, probably better for the tests themselves to ask
 for something with an unlikely name, e.g. `qwertyuiopxxy67.py`.

 Problem is, we can't do that. We're testing manage.py, which is a script
 generated by Django itself, and that script explicitly tries 'import
 settings'. If we're testing the correct behaviour when settings.py doesn't
 exist, we need to be able to use the name 'settings.py'.

 I suppose one alternative is to drop those 11 tests. ./manage.py fails
 outright if you don't have settings.py, no matter what you are trying to
 do. Testing that it does fail is certainly nice for the sake of
 completeness, but in reality, it's not actually a scenario that is likely
 to cause much difficulty.

 If anything, it highlights a problem with ./manage.py - the fact that  *
 you can't use it if you don't have settings.py defined, even if you
 provide --settings or DJANGO_SETTINGS_MODULE, and if you happen to have a
 module on your pythonpath that is called 'settings' but isn't a settings
 module, you could get some very interesting behaviour.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/7715#comment:5>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to