Opened 13 years ago
Closed 12 years ago
#16122 closed Cleanup/optimization (fixed)
Unify the modeltests, regressiontest test directories hierarchies
Reported by: | Ramiro Morales | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
I'm attaching a patch that moves the tests under modeltests
to regressiontests
as a starting point.
Attachments (1)
Change History (12)
by , 13 years ago
Attachment: | unified-tests.diff added |
---|
comment:2 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|
See also #15837 for another test suite cleanup.
To make things even clearer, perhaps the folder "regressiontests" could be renamed "test_apps", or simply "apps" (or something like that)?
comment:4 by , 13 years ago
Yes forgot to add a note about that. Jannis tweeted a pointer to this work to incorporate QUnit to test JavaScript code. Sean Bleier proposes there to use a tests/python/{modeltests,regressiontests}/<actual test dirs>
structure.
Maybe we can do away with the {modeltests,regressiontests}/
part and simply have python
?:
+- django +- tests +- python +- admin_changelist | +- admin_filter | +- ... | +- qunit -+ ...
comment:5 by , 13 years ago
FTR, I tweeted the wrong branch regarding the qunit feature at first, correct one: https://github.com/sebleier/django/tree/qunit
comment:6 by , 13 years ago
UI/UX: | unset |
---|
I don't think there's a need for splitting out qunit tests at that level, as those are supposed to be embedded inside each app. I think it would more likely be something like:
+- django +- tests +- apps +- admin_changelist +- qunit +- ... | +- __init__.py | +- models.py | +- tests.py +- admin_filter +- ...
It could also do without the apps/
folder and simply have all the test apps right under tests/
Also, in sebleier's branch, the qunit tests are expected to be in a my_app/tests/javascript/
folder but a more explicit my_app/tests/qunit
might be better in case Django supports other javascript testing frameworks in the future.
comment:7 by , 13 years ago
Patch needs improvement: | set |
---|
comment:11 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This is fixed in #19921 -- We might move to a subfolder at some later point in the future if needed, tests should be moveable now without any changes.
See also #14699 and #16028.
Note about the patch: It is generated with mercurial using the
--git
. Maybe i is better to perform the tests dirs moving using a SVN WC to be sure histry is preserved for the files being moved.