#4371: fixture loading fails silently in testcases
-----------------------------------------------------+----------------------
   Reporter:  John Shaffer <[EMAIL PROTECTED]>  |                Owner:  nobody 
         
     Status:  new                                    |            Component:  
Unit test system
    Version:  SVN                                    |           Resolution:    
              
   Keywords:  fixtures                               |                Stage:  
Accepted        
  Has_patch:  1                                      |           Needs_docs:  0 
              
Needs_tests:  0                                      |   Needs_better_patch:  0 
              
-----------------------------------------------------+----------------------
Changes (by russellm):

  * component:  Uncategorized => Unit test system
  * stage:  Unreviewed => Accepted

Comment:

 I agree that this class of error should be caught. However, just upping
 the verbosity level isn't the fix. Tests shouldn't generate errors unless
 something goes wrong.
 
 The dont_suppress.. patch is better. However:
  1. It needs to be updated for the recent management.py refactor
  2. I would argue that if you attempt to load fixture.foo, and the foo
 format isn't supported, it shouldn't just be a message - it should be a
 full error.
  3. The patch doesn't address the issue of errors caused by loading
 fixtures with an implied format. i.e., if you specify loaddata myfixture,
 and you have myfixture.foo, but the foo format isn't valid, no fixtures
 will be loaded, but the provided patch won't catch the error.
 
 Point 3 is a little hard to catch completely; however, you could do a
 reasonable job by raising an error if a fixture is named, but no objects
 are loaded as a result.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4371#comment:3>
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