Opened 8 years ago

Closed 8 years ago

#3035 closed defect (fixed)

syntax error in doctest, utils.text

Reported by: yary h <spm-django@…> Owned by: adrian
Component: Testing framework Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In the trunk, django\utils\text.py:

 line 123, in django.utils.text.smart_split
Failed example:
    list(smart_split('This is "a person's" test.'))
Exception raised:
    Traceback (most recent call last):
      File "C:\Python24\lib\doctest.py", line 1243, in __run
        compileflags, 1) in test.globs
      File "<doctest django.utils.text.smart_split[0]>", line 1
         list(smart_split('This is "a person's" test.'))

seems to be caused by not specifying a raw docstring. Change line 117, 118 to:

def smart_split(text):
    r"""

Change History (2)

comment:1 Changed 8 years ago by Yary H <spam-django@…>

  • Component changed from Admin interface to Unit test system

Also see/merge with #3036

comment:2 Changed 8 years ago by mir@…

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

Seems to have been fixed by now ;-)

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