Code

Opened 13 months ago

Closed 11 months ago

Last modified 11 months ago

#20166 closed Uncategorized (fixed)

Fix TEST_DEPENDENCIES documentation

Reported by: czambran@… Owned by: nobody
Component: Documentation Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The example of the documentation for controlling the creation for test databases seems flat out incorrect. From the example I assumed that by default 'diamonds' will not have any dependencies but after reading the code(https://github.com/django/django/blob/master/django/test/simple.py#L296), what actually happens is that Django makes all databases dependent on the default one which is how the guarantee that by default the default DB will be created first. If you run the code as specified in the example you should get the Exception ImproperlyConfigured because the diamonds DB will depend on default and the default DB will depend on the diamonds one.

Attachments (0)

Change History (3)

comment:1 Changed 13 months ago by czambran@…

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Here is my recommendation to make the documentation clearer and the example valid: https://github.com/czambran/django/commit/39a79dc0cdec6de6820f10bd6a6919eb001a3ebb

comment:2 Changed 11 months ago by Tim Graham <timograham@…>

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

In f10e9af22759cc287a967bba02c75d2834761f1e:

Fixed #20166 - Corrected TEST_DEPENDENCIES example in testing docs.

Thanks czambran.

comment:3 Changed 11 months ago by Tim Graham <timograham@…>

In f7fefb361d044cac897bff86531281b2e2ead83e:

[1.5.x] Fixed #20166 - Corrected TEST_DEPENDENCIES example in testing docs.

Thanks czambran.

Backport of f10e9af227 from master

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.