--
Ticket URL: <https://code.djangoproject.com/ticket/25889>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: akaariai (added)
* stage: Unreviewed => Accepted
Comment:
I think the issue is that for queries tests, they are not easily
categorized or described. Many of the tickets are "here is query that
regressed." If we can break up the single `tests.py` file into multiple
tests files (perhaps based on the models they use) and `models.py` into a
package similar to `tests/auth_tests/models`, I think that would be a
useful task. If we can do some renaming along the way, that seems okay but
it would be easiest to review in a separate commit from one that moves
things around.
--
Ticket URL: <https://code.djangoproject.com/ticket/25889#comment:1>
--
Ticket URL: <https://code.djangoproject.com/ticket/25889#comment:2>
* status: new => assigned
* owner: nobody => reficul31
--
Ticket URL: <https://code.djangoproject.com/ticket/25889#comment:3>
Comment (by reficul31):
After cleaning most of the method names and adding some context in
comments. There are some methods that have multiple tests. Eg.
test_ticketno_1 then we have test_ticketno_2. What should be done with
such tests. We could group them into a single class maybe and provide some
additional information in the comments? Or we could have like
test_context_of_test_1?
--
Ticket URL: <https://code.djangoproject.com/ticket/25889#comment:4>
Comment (by reficul31):
Replying to [comment:1 Tim Graham]:
> If we can break up the single `tests.py` file into multiple tests files
(perhaps based on the models they use) and `models.py` into a package
similar to `tests/auth_tests/models`, I think that would be a useful task.
If we can do some renaming along the way, that seems okay but it would be
easiest to review in a separate commit from one that moves things around.
I think this sort of thing won't be easy. As most of the models aren't
reused. If the patch required something there was a high chance that the
contributor made the model similar to that given in the ticket. According
to me the maximum we can do is to rename the tests such that they provide
the context of what the test is for without loosing the information
provided by the original author of the test.
--
Ticket URL: <https://code.djangoproject.com/ticket/25889#comment:5>
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
Comment:
[[https://github.com/django/django/pull/7993|PR]]
--
Ticket URL: <https://code.djangoproject.com/ticket/25889#comment:6>
* owner: reficul31 => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/25889#comment:7>