Opened 5 years ago

Closed 5 years ago

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

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


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 5 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 5 years ago by mmcnickle

  • Cc mmcnickle added

comment:3 Changed 5 years ago by carljm

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 5 years ago by russellm

  • Resolution set to wontfix
  • Status changed from new to closed

@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