#12640: Test execution order isn't exactly equal to the used before since r12255
-------------------------------+--------------------------------------------
 Reporter:  ramiro             |       Owner:  nobody    
   Status:  new                |   Milestone:  1.2       
Component:  Testing framework  |     Version:  SVN       
 Keywords:                     |       Stage:  Unreviewed
Has_patch:  1                  |  
-------------------------------+--------------------------------------------
 This cause a failure in the `model_package` modeltest (it has a model
 defined in `tests.py` file, see  #12245).

 http://buildbot.djangoproject.com/builders/django-
 trunk%20ubuntu9.10-py2.6-sqlite/builds/162/steps/test/logs/stdio

 {{{
 File "/home/buildbot/slave-py2.6/parts/ubuntu9.10-py2.6-sqlite/django-
 trunk_ubuntu9.10-py2.6-sqlite/build/tests/modeltests/model_package/tests.py",
 line ?, in modeltests.model_package.tests.__test__.API_TESTS
 Failed example:
     ad.save()
 Exception raised:
     Traceback (most recent call last):
       File "/home/buildbot/slave-py2.6/parts/ubuntu9.10-py2.6-sqlite
 /django-trunk_ubuntu9.10-py2.6-sqlite/build/django/test/_doctest.py", line
 1267, in __run
         compileflags, 1) in test.globs
       File "<doctest
 modeltests.model_package.tests.__test__.API_TESTS[18]>", line 1, in
 <module>
         ad.save()
       File "/home/buildbot/slave-py2.6/parts/ubuntu9.10-py2.6-sqlite
 /django-trunk_ubuntu9.10-py2.6-sqlite/build/django/db/models/base.py",
 line 430, in save
         self.save_base(using=using, force_insert=force_insert,
 force_update=force_update)
       File "/home/buildbot/slave-py2.6/parts/ubuntu9.10-py2.6-sqlite
 /django-trunk_ubuntu9.10-py2.6-sqlite/build/django/db/models/base.py",
 line 519, in save_base
         result = manager._insert(values, return_id=update_pk, using=using)
       File "/home/buildbot/slave-py2.6/parts/ubuntu9.10-py2.6-sqlite
 /django-trunk_ubuntu9.10-py2.6-sqlite/build/django/db/models/manager.py",
 line 197, in _insert
         return insert_query(self.model, values, **kwargs)
       File "/home/buildbot/slave-py2.6/parts/ubuntu9.10-py2.6-sqlite
 /django-trunk_ubuntu9.10-py2.6-sqlite/build/django/db/models/query.py",
 line 1345, in insert_query
         return query.get_compiler(using=using).execute_sql(return_id)
       File "/home/buildbot/slave-py2.6/parts/ubuntu9.10-py2.6-sqlite
 /django-
 trunk_ubuntu9.10-py2.6-sqlite/build/django/db/models/sql/compiler.py",
 line 730, in execute_sql
         cursor = super(SQLInsertCompiler, self).execute_sql(None)
       File "/home/buildbot/slave-py2.6/parts/ubuntu9.10-py2.6-sqlite
 /django-
 trunk_ubuntu9.10-py2.6-sqlite/build/django/db/models/sql/compiler.py",
 line 674, in execute_sql
         cursor.execute(sql, params)
       File "/home/buildbot/slave-py2.6/parts/ubuntu9.10-py2.6-sqlite
 /django-
 trunk_ubuntu9.10-py2.6-sqlite/build/django/db/backends/sqlite3/base.py",
 line 189, in execute
         return Database.Cursor.execute(self, query, params)
     OperationalError: no such table: model_package_advertisment
 }}}

 Problem is the test database creation step and the create test suite steps
 have their order exchanged when compared to how they were run before.

 I guess this is because the suite building step populates the app cache
 and that allows models defined in `tests.py` to be picked and their DB
 table created.

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