#20483: Reduce the set of apps seen by individual tests
--------------------------------------+------------------------------------
     Reporter:  akaariai              |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Testing framework     |                  Version:  master
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  1
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by aaugustin):

 Replying to [comment:23 akaariai]:
 > We can get rid of the delete cascade problem - any model outside
 currently available apps should be empty, so cascading to those models
 should not do anything in any case. But the truncate cascade problem is
 harder. PostgreSQL won't let you truncate a table if all dependant tables
 aren't truncated in the same query, even if those dependant tables are
 empty. We can either use TRUNCATE CASCADE (but this can cascade to models
 outside of Django's control), or the current logic of expanding cascades.



 I thought requiring every related app to be in `available_apps` solved
 this problem?

 I wanted to document it like this:
 https://github.com/aaugustin/django/commit/4717a1e

 If the trade-off is "a few more apps in available_apps" vs. "logic for
 expanding cascades", I'm choosing the first one :)

 As far as I can tell, for Django's own test suite, we don't have the
 problem because we don't have inter-app FKs, do we?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20483#comment:25>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.e9871906cb70ca519d7bd06a7b841578%40djangoproject.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to