Opened 16 years ago

Closed 16 years ago

#7293 closed (fixed)

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

Reported by: Antti Kaihola Owned by: nobody
Component: Testing framework Version: dev
Severity: 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

$ 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 Antti Kaihola 16 years ago.
fix for the docstrings in django/template/init.py

Download all attachments as: .zip

Change History (2)

by Antti Kaihola, 16 years ago

Attachment: 7293.patch added

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

comment:1 by Russell Keith-Magee, 16 years ago

Resolution: fixed
Status: newclosed

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

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