#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       
 Keywords:                    |       Stage:  Unreviewed
Has_patch:  0                 |  
------------------------------+---------------------------------------------
 This may be a PEBCAK issue, but I can't see it.

 I run the Django tests as follows
 {{{
 > cd django.git/tests
 > ./runtests.py --settings=settings3.py
 }}}
 (etc).

 The admin tests introduced in [7876] are showing 11 failures (from 83
 tests) now. They are all failing in the same way:
 {{{
 #!python
 File "/usr/lib/python2.5/site-
 packages/django/core/management/__init__.py", line 251, in setup_environ
     project_module = __import__(project_name, {}, {}, [''])
 ImportError: No module named tests
 }}}

 Note that `site-packages/django/` is a symlink to my development codebase,
 so it is running the right code. I just don't want to have to mess around
 with `PYTHONPATH` settings all the time, so I use `site-packages` as Guido
 intended.

 The `PYTHONPATH` modification set up in `run_test()` looks sensible when I
 print it out right after it's set.
 {{{
 
/home/malcolm/BleedingEdge/Django/django.git/tests:/home/malcolm/BleedingEdge/Django/django.git
 }}}
 In fact, the full `sys.path` setting at the time of the problem looks
 pretty decent, too (I catch the import exception and dump this to a file,
 so this is the real value at the time of the crime):
 {{{
 ['/home/malcolm/BleedingEdge/Django/django.git/tests/regressiontests',
 '/home/malcolm/BleedingEdge/Django/django.git/tests',
 '/home/malcolm/BleedingEdge/Django/django.git', '/usr/lib/python25.zip',
 '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2',
 '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload',
 '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-
 packages/Numeric', '/usr/lib/python2.5/site-packages/PIL',
 '/usr/lib/python2.5/site-packages/gst-0.10', '/usr/lib/python2.5/site-
 packages/gtk-2.0',
 '/home/malcolm/BleedingEdge/Django/django.git/tests/..']
 }}}
 This is all with a nice clean tree (nuked the .pyc files and everything
 not under source control) using [7882]. I am most confused, but don't
 really have time to debug it now, since this cropped up whilst checking
 something else. Maybe it's obvious and I'm not seeing it, but it's
 definitely repeatable.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/7715>
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