Opened 19 years ago
Closed 19 years ago
#3035 closed defect (fixed)
syntax error in doctest, utils.text
| Reported by: | Owned by: | Adrian Holovaty | |
|---|---|---|---|
| Component: | Testing framework | Version: | dev | 
| Severity: | normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no | 
| Needs tests: | no | Patch needs improvement: | no | 
| Easy pickings: | no | UI/UX: | no | 
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 by , 19 years ago
| Component: | Admin interface → Unit test system | 
|---|
comment:2 by , 19 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | new → closed | 
Seems to have been fixed by now ;-)
  Note:
 See   TracTickets
 for help on using tickets.
    
Also see/merge with #3036