#2333: Add unit test framework for end-user Django applications
---------------------------------+------------------------------------------
Reporter: russellm | Owner: russellm
Status: new | Component: Unit test system
Version: SVN | Resolution:
Keywords: unit test doctest | Stage: Design decision needed
Has_patch: 1 | Needs_docs: 1
Needs_tests: 0 | Needs_better_patch: 1
---------------------------------+------------------------------------------
Comment (by russellm):
Jacob:
Postgres 7.x doesn't have a TRUNCATE statement; Postgres 8.0 added
TRUNCATE, but it has a problem. If Table1 contains references to Table2,
the TRUNCATE approach fails because the table contraint rules kick in.
I've tried putting the TRUNCATE calls into a transaction, but it didn't
seem to help - the constraint rules seemed to kick in during the
transaction.
Postgres 8.1 fixed this problem by allowing you to specify multiple tables
in a single TRUNCATE statement:
{{{
TRUNCATE table1, table2;
}}}
which doesn't activate the constraint checker.
Now; I'm not denying that the problem with 8.0 may exist (at least
partially) between my keyboard and my chair; I might have just messed up
in my use of transactions when I was testing with 8.0. However, this still
leaves the Postgres 7.x issue. 7.x will need to regress to either deletion
of rows (like the SQLite implementation), a table destroy/resync, or a
complete database destroy/recreate. Supporting 7.x also introduces the
need to identify what database version is running so that the correct
solution can be applied.
This is all made more difficult by the fact that I have very limited
access to a Postgres 8.0 install, and no access to a Postgres 7.x install,
so my ability to test these earlier versions is somewhat restricted. Any
assistance on this front would be greatfully accepted.
--
Ticket URL: <http://code.djangoproject.com/ticket/2333#comment:34>
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
-~----------~----~----~----~------~----~------~--~---