Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#15154 closed (fixed)

Remove sample doctest from startapp stub

Reported by: carljm Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Given the problems Django itself has experienced using doctests as a primary testing strategy, and the effort that's recently gone into removing them, do we really want to be encouraging Django users to adopt practices that have served us so poorly?

Seems like the sample doctest in the stub generated by startapp should probably go away.

Optionally, the Django testing docs could also be given a quick once-over to see if there are places we should be warning users against the siren song of using doctests as a primary test strategy.

Attachments (0)

Change History (3)

comment:1 Changed 3 years ago by russellm

  • milestone set to 1.3
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Sounds good to me. After all, we've always been at war with doctests. :-)

The second optional point has already been done; unittest is listed in the docs before doctests, and the "which should I use" section has been beefed up to clarify the preference for unittests. Of course, if you have more specific suggestions, let's have 'em.

comment:2 Changed 3 years ago by Alex

  • Resolution set to fixed
  • Status changed from new to closed

(In [15314]) Fixed #15154 -- removed doctests from the generated with createapp.

comment:3 Changed 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.