#7694: Models that are imported into tests.py (and utilize signals) result in
parallel tests that break test cases
---------------------------------------+------------------------------------
          Reporter:  davenaff          |         Owner:  nobody
            Status:  closed            |     Milestone:        
         Component:  Unit test system  |       Version:  SVN   
        Resolution:  invalid           |      Keywords:        
             Stage:  Unreviewed        |     Has_patch:  0     
        Needs_docs:  0                 |   Needs_tests:  0     
Needs_better_patch:  0                 |  
---------------------------------------+------------------------------------
Changes (by russellm):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => invalid
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 What you're seeing is the result of the signal handler getting installed
 twice. This is due to a quirk of Python's model importer; if one file has
 "from foo.bar import whiz", and a second file has "from bar import whiz",
 the whiz module will be imported and processed twice, as long as the
 PYTHONPATH supports finding both locations.

 In this case, I'm guessing that two locations are settings.INSTALLED_APPS
 and tests.py differ - one has the full project path, but the other only
 has the application name in the import. As a result, the module is getting
 imported twice, and the signal is getting installed twice. If you modify
 the import paths to be consistent, the problem will go away.

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