Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#17366 closed Cleanup/optimization (fixed)

Deprecate loading tests from models.py

Reported by: Alex Gaynor Owned by: jcatalan
Component: Testing framework Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

This is inconsistent with pretty much every other test tool, and really doesn't make a whole lot of sense.

Change History (9)

comment:1 Changed 5 years ago by Russell Keith-Magee

There is a reason that models.py was searched for tests -- it's to catch any doctests that are defined on model methods.

I'm not necessarily arguing against the decision to deprecate models.py as a source of tests, but given that it wasn't a completely arbitrary decision in the first place, it's worth documenting the specific consequences.

comment:2 Changed 4 years ago by EmilStenstrom

Component: Testing frameworkDocumentation

comment:3 Changed 4 years ago by Tim Graham

I don't think this should be a documentation ticket as its scope is much larger than just that, correct?

comment:4 Changed 4 years ago by Aymeric Augustin

Component: DocumentationTesting framework

comment:5 Changed 4 years ago by jcatalan

Owner: changed from nobody to jcatalan
Status: newassigned

comment:6 Changed 3 years ago by Carl Meyer <carl@…>

Resolution: fixed
Status: assignedclosed

In 9012833af857e081b515ce760685b157638efcef:

Fixed #17365, #17366, #18727 -- Switched to discovery test runner.

Thanks to Preston Timmons for the bulk of the work on the patch, especially
updating Django's own test suite to comply with the requirements of the new
runner. Thanks also to Jannis Leidel and Mahdi Yusuf for earlier work on the
patch and the discovery runner.

Refs #11077, #17032, and #18670.

comment:7 Changed 3 years ago by Florian Apolloner <florian@…>

In e23a5f9a4730ddecb8f3950ee2936716f458c506:

Fixed a regression in the test runner loading of runtests.py.

Refs #17365, #17366, #18727.

comment:8 Changed 3 years ago by Florian Apolloner <florian@…>

In 2bf403ecbd958bfb269794b36e61b69f0aede4cf:

Fixed a regression from e23a5f9a4730ddecb8f3950ee2936716f458c506.

Excluded postgis specific gis tests from other spatial databases.

Refs #17365, #17366, #18727.

comment:9 Changed 3 years ago by Tim Graham <timograham@…>

In bf5430a20b65b3e76a2f8cd2580101e0baa59f82:

Removed django.test.simple and django.test._doctest per deprecation timeline.

refs #17365, #17366, #18727.

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