Code

Opened 3 years ago

Closed 14 months ago

#16122 closed Cleanup/optimization (fixed)

Unify the modeltests, regressiontest test directories hierarchies

Reported by: ramiro Owned by: nobody
Component: Testing framework Version: master
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 3 years ago.

Download all attachments as: .zip

Change History (12)

Changed 3 years ago by ramiro

comment:1 Changed 3 years ago by ramiro

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 3 years ago by ramiro (previous) (diff)

comment:2 Changed 3 years ago by anonymous

  • Triage Stage changed from Unreviewed to 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:3 Changed 3 years ago by julien

Sorry, that was me.

comment:4 Changed 3 years ago by ramiro

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 Changed 3 years ago by jezdez

FTR, I tweeted the wrong branch regarding the qunit feature at first, correct one: https://github.com/sebleier/django/tree/qunit

comment:6 Changed 3 years ago by julien

  • 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 Changed 3 years ago by julien

  • Patch needs improvement set

comment:8 Changed 3 years ago by jacob

  • milestone 1.4 deleted

Milestone 1.4 deleted

comment:9 Changed 18 months ago by Claude Paroz <claude@…>

In 45802e12481e86f7b9c1f392a54b9d25671214d9:

Merged pagination tests

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

comment:10 Changed 18 months ago by Claude Paroz <claude@…>

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 Changed 14 months ago by apollo13

  • Resolution set to fixed
  • Status changed from new to 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.