Code

Opened 6 years ago

Closed 6 years ago

#7293 closed (fixed)

django.template docstrings not accurate (fail doctest.testmod)

Reported by: akaihola Owned by: nobody
Component: Testing framework Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:

Description

$ DJANGO_SETTINGS_MODULE=dummy_settings python -c "import doctest;from django import template;doctest.testmod(template)"
**********************************************************************
File "/home/akaihola/dl/prg/www/django/django/template/__init__.py", line 469, in django.template.FilterExpression
Failed example:
    fe.var
Expected:
    'variable'
Got:
    <Variable: 'variable'>
**********************************************************************
File "/home/akaihola/dl/prg/www/django/django/template/__init__.py", line 602, in django.template.Variable
Failed example:
    Variable('article.section').resolve(c)
Expected:
    u'News'
Got:
    'News'
**********************************************************************
File "/home/akaihola/dl/prg/www/django/django/template/__init__.py", line 610, in django.template.Variable
Failed example:
    Variable('article.section').resolve(c)
Expected:
    u'News'
Got:
    'News'
**********************************************************************
2 items had failures:
   1 of   5 in django.template.FilterExpression
   2 of   8 in django.template.Variable
***Test Failed*** 3 failures.

Attachments (1)

7293.patch (1.0 KB) - added by akaihola 6 years ago.
fix for the docstrings in django/template/init.py

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by akaihola

fix for the docstrings in django/template/init.py

comment:1 Changed 6 years ago by russellm

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

(In [7580]) Fixed #7293 -- Corrected some doctests strings internal to the template module. Thanks, akaihola.

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.