Opened 13 years ago

Closed 13 years ago

#14677 closed (wontfix) cannot be split to package always

Reported by: Jari Pennanen Owned by: nobody
Component: Testing framework Version: dev
Severity: Keywords:
Cc: mmcnickle Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


My grew too big, and followed advice to split it to package tests, but not all features are supported that way, which is a shame, there really should be support.

Especially the models defined in cannot be moved to individual tests/, even though one imports all from in tests/ it keeps throwing error that the model is not created to database.

See also my django-users discussion, for more thorough example.

Change History (4)

comment:1 Changed 13 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

comment:2 Changed 13 years ago by mmcnickle

Cc: mmcnickle added

comment:3 Changed 13 years ago by Carl Meyer

This is parallel to #4470, which should be fixed by merging the GSOC branch to fix #3591. In the meantime the same workaround (explicit Meta.app_label on the models) works just as well.

It's also possible (I haven't tested) that the #3591 GSOC branch might break the technique of putting models in entirely; as far as I know that technique has never been documented or officially supported. Though perhaps it should be; seems like a relatively clean solution for #7835.

comment:4 Changed 13 years ago by Russell Keith-Magee

Resolution: wontfix
Status: newclosed

@carljm makes a fair point. Django's test suite puts models in, but that isn't a documented capability, and it has some fairly nasty side effects (not the least of which is dirtying of the content types and app cache).

I'm going to marking this closed wontfix; it's an undocumented capability, and rather than paper over the problem, we should be focussing on #7835 to provide the "real" solution.

Note: See TracTickets for help on using tickets.
Back to Top