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)

unified-tests.diff (60.1 KB ) - added by Ramiro Morales 13 years ago.

Download all attachments as: .zip

Change History (12)

by Ramiro Morales, 13 years ago

Attachment: unified-tests.diff added

comment:1 by Ramiro Morales, 13 years ago

See also #14699 and #16028.

Note about the patch: It is generated with mercurial using the --git diff option. Maybe it is better to perform the move of tests directories using a SVN WC to be sure history is preserved for the files being moved.

Last edited 13 years ago by Ramiro Morales (previous) (diff)

comment:2 by anonymous, 13 years ago

Triage Stage: UnreviewedAccepted

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:3 by Julien Phalip, 13 years ago

Sorry, that was me.

comment:4 by Ramiro Morales, 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 Jannis Leidel, 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 Julien Phalip, 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 Julien Phalip, 13 years ago

Patch needs improvement: set

comment:8 by Jacob, 13 years ago

milestone: 1.4

Milestone 1.4 deleted

comment:9 by Claude Paroz <claude@…>, 12 years ago

In 45802e12481e86f7b9c1f392a54b9d25671214d9:

Merged pagination tests

It is simpler/cleaner to have all pagination tests in a single file.
Refs #16122.

comment:10 by Claude Paroz <claude@…>, 12 years ago

In bf35fb600637b020748d05b704a1c0257c7cb63a:

[1.5.x] Merged pagination tests

It is simpler/cleaner to have all pagination tests in a single file.
Refs #16122.
Backport of 45802e12481 from master.

comment:11 by Florian Apolloner, 12 years ago

Resolution: fixed
Status: newclosed

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.

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